AWS DevOps Serverless Deployment 5 — Questions and Answers
Question 1: A Lambda function deployed in a VPC cannot reach an external AWS service endpoint. What is the most likely missing configuration?
- Lambda reserved concurrency is too low
- VPC NAT Gateway or VPC endpoint for the target service is missing (Correct answer)
- Lambda timeout is too short
- Lambda memory is insufficient
Correct answer: VPC NAT Gateway or VPC endpoint for the target service is missing
Lambda functions in a VPC lose their default internet access; a NAT Gateway or VPC endpoint must be configured to reach AWS services or the internet.
Question 2: Which AWS service can be used to manage and deploy serverless applications shared in the AWS Serverless Application Repository?
- AWS CodeCommit
- AWS SAM CLI with sam deploy
- AWS Serverless Application Repository with sar deploy (Correct answer)
- AWS CloudFormation StackSets
Correct answer: AWS Serverless Application Repository with sar deploy
The AWS Serverless Application Repository allows teams to publish, share, and deploy serverless applications directly using the SAR console or API.
Question 3: What is the purpose of Lambda Destinations for asynchronous invocations?
- To store function deployment packages
- To route success and failure results to services like SQS, SNS, or EventBridge without custom code (Correct answer)
- To enable VPC connectivity for Lambda
- To cache function responses
Correct answer: To route success and failure results to services like SQS, SNS, or EventBridge without custom code
Lambda Destinations automatically send the result of asynchronous invocations to a configured target service on success or failure, replacing the need for custom error-handling code.
Question 4: In a SAM template, the Globals section is used to define shared settings. Which of the following properties CANNOT be set in Globals?
- Timeout
- MemorySize
- FunctionName (Correct answer)
- Environment
Correct answer: FunctionName
FunctionName is resource-specific and cannot be defined in the Globals section; properties like Timeout, MemorySize, and Environment variables can be shared globally.
Question 5: A DevOps engineer needs Lambda function logs to be exported to an S3 bucket for long-term storage. What is the correct approach?
- Configure Lambda to write directly to S3 in code
- Create a CloudWatch Logs subscription filter that streams to Kinesis Firehose and then S3 (Correct answer)
- Enable Lambda X-Ray tracing
- Use Lambda Destinations with an S3 target
Correct answer: Create a CloudWatch Logs subscription filter that streams to Kinesis Firehose and then S3
CloudWatch Logs subscription filters can stream log data to Kinesis Data Firehose, which then delivers the logs to S3 for archival.
Question 6: Which CodePipeline action category is used to invoke a Lambda function as a custom action within a deployment pipeline?
- Source
- Build
- Invoke (Correct answer)
- Deploy
Correct answer: Invoke
The Invoke action category in CodePipeline is specifically designed to call a Lambda function, enabling custom logic at any pipeline stage.
Question 7: When using AWS CDK Pipelines to deploy a serverless application, which construct represents a self-mutating pipeline that updates itself before deploying application changes?
- CodePipeline
- CodeBuildStep
- CodePipeline with selfMutation: true (pipelines.CodePipeline) (Correct answer)
- StageDeployment
Correct answer: CodePipeline with selfMutation: true (pipelines.CodePipeline)
The aws-cdk-lib/pipelines CodePipeline construct with selfMutation enabled (the default) automatically updates the pipeline definition before deploying application stages.
A Lambda function deployed in a VPC cannot reach an external AWS service endpoint.
What is the most likely missing configuration?