Topic 1 Question 86
A developer is implementing an AWS Cloud Development Kit (AWS CDK) serverless application. The developer will provision several AWS Lambda functions and Amazon API Gateway APIs during AWS CloudFormation stack creation. The developer's workstation has the AWS Serverless Application Model (AWS SAM) and the AWS CDK installed locally.
How can the developer test a specific Lambda function locally?
Run the sam package and sam deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
Run the cdk synth and cdk deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
Run the cdk synth and sam local invoke commands with the function construct identifier and the path to the synthesized CloudFormation template.
Run the cdk synth and sam local start-lambda commands with the function construct identifier and the path to the synthesized CloudFormation template.
ユーザの投票
コメント(2)
- 正解だと思う選択肢: C
The developer can test a specific Lambda function locally by running the cdk synth command to synthesize the AWS CDK application into an AWS CloudFormation template. Then, the developer can use the sam local invoke command with the function construct identifier and the path to the synthesized CloudFormation template to test the Lambda function locally (option C).
👍 3MrTee2023/04/21 - 正解だと思う選択肢: C
sam local invoke StackLogicalId/FunctionLogicalId https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-local-invoke.html
👍 2zodraz2023/05/08
シャッフルモード