A company needs to keep user transaction data in an Amazon DynamoDB table. The company must retain the data for 7 years.
What is the MOST operationally efficient solution that meets these requirements?
A. Use DynamoDB point-in-time recovery to back up the table continuously.
B. Use AWS Backup to create backup schedules and retention policies for the table.
C. Create an on-demand backup of the table by using the DynamoDB console. Store the backup in an Amazon S3 bucket. Set an S3 Lifecycle configuration for the S3 bucket.
D. Create an Amazon EventBridge (Amazon CloudWatch Events) rule to invoke an AWS Lambda function. Configure the Lambda function to back up the table and to store the backup in an Amazon S3 bucket. Set an S3 Lifecycle configuration for the S3 bucket.
B
一家公司需要將用戶交易數(shù)據(jù)存儲在 Amazon DynamoDB 表中,并且必須將數(shù)據(jù)保留 7 年。該公司有在 DynamoDB 表中存儲用戶交易數(shù)據(jù)并保留 7 年的需求,需要找出在操作上最有效的解決方案。
技巧:排除明顯錯誤選項,在沒有明顯錯誤的選項中選擇最合理的選項。
A. 不正確。使用 DynamoDB 按時間點恢復(fù)來持續(xù)備份表。使用按時間點恢復(fù)服務(wù),只能恢復(fù)到過去 35 天內(nèi)的任意時間點,無法滿足 7 年的數(shù)據(jù)保留要求。該選項不符合。
B. 正確。使用 AWS Backup 為表創(chuàng)建備份計劃和保留策略。該方案中,AWS Backup 可以方便地創(chuàng)建備份計劃并設(shè)置保留策略,能夠滿足 DynamoDB 表數(shù)據(jù)長期(7 年)保留的需求,在操作上相對簡單高效,是合適的解決方案。
C. 不正確。使用 DynamoDB 控制臺創(chuàng)建表的按需備份。將備份存儲在 Amazon S3 存儲桶中。為 S3 存儲桶設(shè)置 S3 生命周期配置。該方案中,按需備份需要手動操作,對于 7 年的數(shù)據(jù)保留,缺乏自動化的管理,不是操作上最合適的方案。
D. 不正確。創(chuàng)建 Amazon EventBridge(Amazon CloudWatch Events)規(guī)則來調(diào)用 AWS Lambda 函數(shù)。配置 Lambda 函數(shù)來備份表并將備份存儲在 Amazon S3 存儲桶中。為 S3 存儲桶設(shè)置 S3 生命周期配置。該方案可以實現(xiàn)自動化備份,但相比 AWS Backup 這種專門的備份服務(wù),配置和管理更復(fù)雜,需要編寫和維護(hù) Lambda 函數(shù)代碼,操作效率不如 AWS Backup 高。
DynamoDB 按時間點恢復(fù)(DynamoDB point - in - time recovery):它主要用于持續(xù)備份表,以防止意外數(shù)據(jù)丟失或損壞,可恢復(fù)到過去 35 天內(nèi)的任意時間點,但無法滿足長期(7 年)的數(shù)據(jù)保留需求。
AWS Backup:是一個集中式的備份服務(wù),可以創(chuàng)建備份計劃、設(shè)置保留策略,能方便地管理不同 AWS 資源(包括 DynamoDB 表)的備份,適合長期數(shù)據(jù)保留場景。
DynamoDB 控制臺按需備份(Create an on - demand backup of the table by using the DynamoDB console):需要手動觸發(fā)備份操作,對于長期(7 年)的數(shù)據(jù)保留,操作效率較低,且缺乏自動化的管理。
Amazon EventBridge(Amazon CloudWatch Events)與 AWS Lambda 結(jié)合:通過創(chuàng)建規(guī)則觸發(fā) Lambda 函數(shù)來執(zhí)行備份操作,雖然可以實現(xiàn)自動化備份,但相比專門的備份服務(wù),配置和管理更復(fù)雜,操作效率不是最優(yōu)。
Amazon S3 生命周期配置(S3 Lifecycle configuration):用于管理 S3 存儲桶中對象的生命周期,例如自動將對象轉(zhuǎn)移到不同存儲類或過期刪除,可用于長期存儲備份數(shù)據(jù)并控制成本。