Book Appointment Now

Building Modern Python Applications on AWS Coursera Quiz Answers

All Weeks Building Modern Python Applications on AWS Coursera Quiz Answers

Building Modern Python Applications on AWS Week 01 Quiz Answers

Week 1: Building Modern Python Applications on AWS

Q1. When you access AWS programmatically, you use an access key to verify your identity and the identity of your applications. When programming using the AWS SDK locally on your personal computer, which method should you use for supplying AWS credentials?

  • Configure the AWS Credentials file to contain a username and password associated with an IAM User
  • Use Temporary Role Based Access using IAM Roles
  • Hard coding the credentials into the code
  • Configure the AWS Credentials file to contain an access key id and secret access associated with an IAM User

Q2. What are the three common ways you can interact with the APIs of AWS?

  • HTTPS, IAM Role, Telnet
  • DNS, HTTP, Username and Password
  • AWS Management Console, CLI and SDK
  • Access Key and Secret Key, HTTP and Cloud9

Q3. In Cloud9, how often are the AWS managed temporary credentials automatically rotated?

  • Every 5 hours
  • Every 5 minutes
  • Every 5 seconds
  • Every 5 days

Q4. Which file contains your credentials that the CLI uses to make calls AWS on Cloud9 or from your laptop?

  • .aws/config
  • .aws/credentials
  • .aws/creds
  • .aws/keys

Q5. What command can you use to have more information about the S3 list bucket CLI command?

  • aws s3 ls help
  • help aws ls
  • help aws s3 ls
  • aws ls help

Q6. AWS Cloud9 operates as what kind of cloud-based environment?

  • Integrated Development Environment
  • Independent Deployment Environment
  • Irreplaceable Development Environment
  • Infrastructure Deployment Environment

Q7. What does the AWS Serverless Application Model template specification provide to help deploy your serverless application on AWS?

  • A prebuilt application template for all application types
  • Shorthand syntax to express functions, APIs, databases, and more in a declarative way
  • An Amazon EC2 instance to deploy your application code
  • A drag-and-drop console for developing serverless applications

Q8. Which of the following is NOT one of the steps to use an IAM Role instead of using the AWS managed temporary credentials in Cloud9?

  • Add access key and secret key to credentials file
  • Disable AWS managed temporary credentials
  • Create an IAM Role with an IAM Policy
  • Attach IAM Role to the Cloud9 EC2 instance

Q9. What is considered a best practice for providing AWS credentials to your code using the AWS SDK running?

  • Hard-coding credentials
  • Storing the credentials in a file
  • Using IAM Roles
  • Using environment variables

Building Modern Python Applications on AWS Week 02 Quiz Answers

Week 2: Building Modern Python Applications on AWS

Q1. Consider a scenario where you have created a REST API, and the client using this API is submitting a POST request to an endpoint being hosted by Amazon API Gateway. The client wants to send the payload of the request in a format that is different than the format of the payload the backend code needs.

What Amazon API Gateway REST API feature can you use to transform the payload of the request from the clients format to the format the backend code needs?

  • A Model
  • Integration Request
  • A Mapping
  • Method Response

Q2. A Model is written in VTL and used for Request Validation.

  • True
  • False

Q3. You can create key-value pairs as configuration attributes associated with a deployment stage of a REST API. They act like environment variables and can be used in your API setup and mapping templates.

You can access these variables through the use of:

  • $stageVariables
  • $context
  • $environmentVariables
  • $util

Q4. Which of the following list three ways to add access controls or authorizers for a REST API in Amazon API Gateway?

  • Resource policy, cross-origin resource sharing and Secrets Manager
  • Lambda authorizer, VPC endpoint policy, Cognito User Pool
  • IAM, Client-side SSL certificate and Key Management Service
  • Usage plan, AWS WAF and Security Group

Q5. Which of the following is a way to do access control for an HTTP API in Amazon API Gateway?

  • JSON Web Token
  • Cognito Federated Identities
  • Lambda authorizer
  • IAM

Q6. Which access control mechanism can be used to throttle the amount of request being sent from a client to a REST API in API Gateway?

  • Access Key
  • Secret Key
  • API Key
  • Key Management Service

Q7. At which point of the flow in a method execution in Amazon API Gateway can you add a Cognito User Pool, Lambda or IAM authorizer?

  • Method Request
  • Integration Response
  • Integration Request
  • Method Response

Q8. Which of the following authorizer mechanism will require you to develop it using code in a REST API in API Gateway?

  • Identity and Access Management
  • Lambda authorizer
  • Cognito User Pool
  • Cognito Identity Pool

Q9. What types of APIs can Amazon API Gateway NOT be used to create?

  • WebSocket
  • HTTP
  • BPM
  • REST

Q10. What is used to manage and configure API deployments in Amazon API Gateway?

  • Stage
  • Ledge
  • Cliff
  • Platform

Building Modern Python Applications on AWS Week 03 Quiz Answers

Week 3: Building Modern Python Applications on AWS

Q1. Which mechanism allows you to control who has access your AWS Lambda function and what actions they are allowed to perform?

  • Execution Permissions
  • Resource Based Policies
  • IAM Policies
  • IAM Groups

Q2. AWS Lambda has two main different types of triggers. Triggers that push events to Lambda, like other AWS services or applications you develop, and triggers that are a resource that Lambda reads items from, like a stream or queue, and invokes a function based on a configuration that you create.

What is the second type of trigger called?

  • Event Source Mapping
  • Lambda Source Mapping
  • Push Trigger
  • Pull Resource Configuration

Q3. What is the maximum timeout or maximum amount of time for the execution of a Lambda function?

  • 15 minutes
  • 5 hours
  • 5 minutes
  • 15 hours

Q4. What is the type of runtime that would need to be used to use PHP for the code running in Lambda?

  • Lambda layers
  • You can’t run PHP in Lambda
  • PHP 7.x runtime
  • Custom runtime

Q5. Which of the following is a good use case for using the Provisioned Concurrency feature of Lambda?

  • The application is made up of latency-sensitive microservices.
  • The application is a batch processing tool.
  • The application needs to run once per hour.
  • The application needs access to a relational database.

Q6. When the application code in a Lambda function needs to communicate with a relational database, which feature of the AWS Lambda service would minimize the amount of connections to that relational database?

  • Execution context reuse
  • Provisioned Concurrency
  • Automatic scaling
  • Synchronous invocation

Q7. What are the two ways that a Lambda function can be invoked? Select two.

  • Automatically
  • Synchronously
  • Reduced-latency
  • Asynchronously
  • Provisioned concurrency

Q8. If retry attempts is configured with the default setting on a Lambda function, what do you need to make sure you do in your code?

  • Make sure that your code is idempotent.
  • Make sure that there are no global variables in the code.
  • Make sure that the code can be executed concurrently.
  • Make sure that any transactions on the database are committed.

Q9. In AWS Lambda, what are you responsible for managing?

  • Function Code
  • Operating System Updates
  • Operating System Patches
  • Backend Infrastructure

Q10. Per the AWS shared responsibility model, who is responsible for the protection of customers’ data?

  • The customer
  • Third-party security auditor
  • SFD
  • AWS

Building Modern Python Applications on AWS Week 04 Quiz Answers

Week 4: Building Modern Python Applications on AWS

Q1. You can directly integrate other AWS Services with your State Machine using Tasks. Which of the following actions is not supported by Service Integrations in AWS Step Functions without using an Activity state?

  • Invoking a Lambda Function
  • Run an Amazon Elastic Container Service task
  • Execute a program running on an external server
  • Send a message in Amazon Simple Queue Service

Q2. When defining a Step Function state machine, what language can be used?

  • Java
  • NodeJS
  • Python
  • JSON

Q3. What state type can be used to execute a set of steps for each element of an input array in parallel?

  • Array
  • Parallel
  • Map
  • Choice

Q4. A state machine in AWS Step Function is used for doing continuous deployment as part of a pipeline. One of the steps is to use Lambda to send an email asking for a manager to approve or not the deployment in production.

Which of the following service integration pattern should be used?

  • Activity task
  • Wait for Callback
  • Request Response
  • Run a Job

Q5. A state machine in AWS Step Function makes use of the AWS Batch service to run a batch job on many EC2 instances. The state machine doesn’t need to see the output of the batch job, but only that it started.

Which of the following service integration pattern should be used?

  • Request Response
  • Wait for Callback
  • Run a Job
  • Activity task

Q6. Existing EC2 instances are used to do batch processing on data hosted in an S3 bucket. A state machine in AWS Step Functions must be used to send the location where that data is to that group of instances.

Which of the following would be appropriate steps in the right order for this scenario to work?

  • Create an activity, add the activity to the state machine, and change the code in the EC2 instances to pull from the activity for work to do.
  • Change the code in the EC2 instances to pull from the state machine for work to do using the Wait for Callback integration pattern of a Task type state.
  • Create an activity, add the activity to the state machine, and Step Function will now call the code in the EC2 instance to do the work.
  • Use the Run a Job integration pattern of a Task type state that will call the EC2 instances to do the work.

Q7. Which setting of a Step Function activity task type definition is used to make sure that the worker is still working on activity task it was asked to do?

  • HeartbeatSeconds
  • RetrySeconds
  • TimeoutSeconds
  • CallbackSeconds

Q8. Which of the following service integration pattern is supported by an AWS Step Function Express workflow?

  • Request Response
  • Activity task
  • Run a Job
  • Wait for Callback

Q9. For orchestrating a few Lambda functions that run for a very short duration at volumes as high as 5,000 concurrent execution, which type of workflow should be used?

  • Standard workflow
  • Express workflow
  • Concurrent workflow
  • Dedicated workflow

Q10. Which of the following has the right associations between the service and its function?

  • SNS is a pub/sub and EventBridge is a service bus
  • Step Function orchestrates and SQS is a service bus
  • SQS is a queue service and SNS is a service bus
  • EventBridge is a service bus and Step Function is a pub/sub

Building Modern Python Applications on AWS Week 05 Quiz Answers

Week 5: Building Modern Python Applications on AWS

Q1. In order to turn on distributed tracing with AWS Lambda and capture a segment for the lambda function execution, you must include the AWS SDK for X-Ray in your deployment package.

  • True
  • False

Q2. When using the AWS SDK for X-Ray, to measure granular performance of a singular API call or specific line(s) of code, you can create a new:

  • Trace
  • Sampling Document
  • Annotation
  • Subsegment

Q3. When using the AWS X-Ray SDK in code that will be run on top of AWS Lambda, you must also create and manage the X-Ray Daemon on your own by including it as a dependency in your deployment package.

  • True
  • False

Q4. What do you need to provide to Step Functions so it can be allowed to send logs to CloudWatch Logs?

  • IAM Role
  • IAM Group
  • IAM User
  • IAM Policy

Q5. Which of the following matches the definition of an Amazon CloudWatch Log Group?

  • A group of events coming from the application instance or resource being monitored.
  • A group of records of some activity recorded by the application or resource being monitored.
  • A group of settings determining how long log events are kept in CloudWatch Logs.
  • A group of log streams that share the same retention, monitoring, and access control settings.

Q6. What is the proper flow for sending logs to Amazon CloudWatch Logs?

  • Create a Log Stream, add the Log Stream to the Log Group and send Log Events from the application to the Log Stream.
  • Create a Log Group, then create a Log Stream and send Log Events from the application to the Log Stream.
  • Create a Log Stream, add the Log Stream to the Log Group and send Log Events from the application to the Log Group.
  • Create a Log Group, then create a Log Stream and send Log Events from the application to the Log Group.

Q7. What protocol can be used to send events to Amazon CloudWatch Logs?

  • syslog
  • HTTPS
  • RELP
  • UDP

Q8. What is the easiest way to send logs to Amazon CloudWatch Logs from code in a Lambda function?

  • Use the syslog library to send logs directly to CloudWatch logs
  • Use the Amazon CloudWatch SDK to send logs
  • Write to stdout or stderr and logs will be sent automatically
  • Make an HTTPS call to Amazon CloudWatch logs

Q9. What do you need to define on a Lambda function to send logs to CloudWatch Logs?

  • An IAM Role
  • The Log Stream to send logs to and an IAM Role
  • The Log Group and Log Stream to send logs to
  • The Log Group to send logs to and an IAM Role

Q10. In AWS X-Ray, what represents the compute resources running the application logic?

  • Segments
  • Rays
  • Parts
  • Instances

Building Modern Python Applications on AWS Week 06 Quiz Answers

Quiz 1: Building Modern Python Applications on AWS

Q1. Which file contains your credentials that the CLI uses to make calls AWS on Cloud9 or from your laptop?

  • .aws/keys
  • .aws/creds
  • .aws/credentials
  • .aws/config

Q2. Consider this scenario: You have created a REST API using Amazon API Gateway, and the data that is returned from your API is relatively static. You want to reduce the latency of your API, what feature can you use to enhance performance? Choose 2 answers.

  • Edge Optimized Endpoints
  • API Gateway Response Caching
  • API Gateway Stage Caching
  • Private VPC Endpoints

Q3. What is NOT a best practice for AWS Lambda Functions?

  • Avoid recursive code
  • Cache static assets in the locally available storage for your function in the /tmp directory
  • Run background processes to shorten execution time
  • Minimize the complexity of function dependencies

Q4. Consider this scenario: You are designing an API using Amazon API Gateway that will simply proxy backend resources. There is no need to validate or transform incoming HTTP requests at the Amazon API Gateway level. Which type of API should you use?

  • REST API
  • WebSocket API
  • Private REST API
  • HTTP API

Q5. In order to optimize your Amazon API Gateway API, you should turn on caching for all resources and HTTP methods, including GET, POST, and DELETE.

  • True
  • False

Q6. Which of the following use case would benefit from using an edge-optimized endpoint type for a REST API in API Gateway?

  • The communication between the client and the API needs to stay within a VPC.
  • The clients are EC2 instances running in the same region as the API.
  • The clients are browsers on laptops all from the same office.
  • The clients are mobile phones that are geographically distributed.

Q7. In which of the following locations is Amazon CloudFront hosted?

  • Local zone
  • Region
  • Edge location
  • Availability zone

Q8. There are many more AWS Edge locations than AWS Regions.

  • True
  • False

Q9. What are the steps to make a Lambda layer available to use?

  • Create a Lambda function with an IAM Role for permissions and publish it as a Lambda layer.
  • Create a Lambda function, publish it as a Lambda layer and add permissions using a resource policy.
  • Create the Lambda layer and attach an IAM Role to the Lambda layer for permissions.
  • Create the Lambda layer and add permissions using a resource policy.

Q10. AWS Lambda bills for running functions in what increments?

  • 10 sec
  • 100 ms
  • 1 sec
  • 10 ms

Quiz 2: Building Modern Python Applications on AWS

Q1. Lambda@Edge is a feature of Amazon CloudFront that lets code run closer to the users of distributed applications, helping to improve performance and reduce latency.

  • True
  • False

Q2. In which scenario would Cognito User Pool be the right choice to use over a Cognito Identity Pool?

  • API Gateway, Simple Storage Service, DynamoDB and other AWS services will be used directly by the application.
  • The application behind API Gateway (backend) needs to have information about the user.
  • The authorizer of the API method is set to AWS_IAM in API Gateway.
  • My application requires unauthenticated users to access parts of my application.

Q3. In which of the following locations is Amazon CloudFront hosted?

  • Availability zone
  • Edge location
  • Local zone
  • Region

Q4. When the application code in a Lambda function needs to communicate with a relational database, which feature of the AWS Lambda service would minimize the amount of connections to that relational database?

  • Synchronous invocation
  • Execution context reuse
  • Provisioned Concurrency
  • Automatic scaling

Q5. What is the maximum timeout or maximum amount of time for the execution of a Lambda function?

  • 5 hours
  • 15 minutes
  • 5 minutes
  • 15 hours

Q6. What feature can be used to know if a Lambda function, that was asynchronously invoked, executed successfully?

  • Dead-letter queue
  • Looking at the response code
  • Retries
  • Destinations

Q7. What actions within AWS are done as an API call?

  • A few actions
  • About half of the actions
  • Some actions
  • Almost all of the actions

Q8. When AWS Lambda executes your Lambda function, it provisions and manages the resources needed to run your Lambda function. This is called the execution context, and it is a temporary runtime environment. After a Lambda function is executed, AWS Lambda maintains the execution context for some time in anticipation of another Lambda function invocation.

What can you do in your code to take advantage of execution context re-use for performance optimization? Select two.

  • Store data in environment variables as a cache
  • Declare objects outside of the handler method
  • Write data to the /tmp directory to be used as a transient cache
  • Write code that pings your lambda function once an hour to keep the execution context alive

Q9. What types of APIs can Amazon API Gateway NOT be used to create?

  • REST
  • WebSocket
  • BPM
  • HTTP

Q10. In which of the following use case a Lambda layer should NOT be used?

  • I would like to separate all my small libraries individually to share across Lambda functions.
  • I would like to share my custom runtime with others.
  • I would like to keep my Lambda deployment package small.
  • I would like to share code across many different Lambda functions in different AWS accounts.

Q11. Which of the following statement is true when using AWS Lambda layers?

  • Lambda functions can only use Lambda layers created in the same AWS account.
  • The maximum size of the Lambda deployment package including layers is 250 MB.
  • Layers are shared automatically with every AWS customer.
  • A Lambda function can only use one layer at a time.

Q12. What is the easiest way to send logs to Amazon CloudWatch Logs from code in a Lambda function?

  • Make an HTTPS call to Amazon CloudWatch logs
  • Use the syslog library to send logs directly to CloudWatch logs
  • Write to stdout or stderr and logs will be sent automatically
  • Use the Amazon CloudWatch SDK to send logs

Q13. A state machine in AWS Step Function is used for doing continuous deployment as part of a pipeline. One of the steps is to use Lambda to send an email asking for a manager to approve or not the deployment in production. Which of the following service integration pattern should be used?

  • Wait for Callback
  • Activity task
  • Request Response
  • Run a Job

Q14. When using the AWS SDK for X-Ray, to measure granular performance of a singular API call or specific line(s) of code, you can create a new:

  • Annotation
  • Trace
  • Sampling Document
  • Subsegment

Q15. At which point of the flow in a method execution in Amazon API Gateway can you add a Cognito User Pool, Lambda or IAM authorizer?

  • Integration Request
  • Method Request
  • Integration Response
  • Method Response

Get All Course Quiz Answers of Modern Application Development with Python on AWS Specialization

AWS Cloud Technical Essentials Coursera Quiz Answers

Building Modern Python Applications on AWS Coursera Quiz Answers

Amazon DynamoDB: Building NoSQL Database-Driven Applications Quiz Answers

Improve Your Python Code Using Amazon CodeGuru Coursera Quiz Answers

Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *