Deployment Flashcards

1
Q

What is the correct way to deploy the new version to Elastic Beanstalk via the CLI?

A

Package your application as a zip file and deploy it using the ‘eb deploy’ command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the update-application command in elastic beanstalk do?

A

just updates the specified properties of the application. This command does not allow you to upload packages to Elastic Beanstalk.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What types of files can EB CLI deploy?

A

a ZIP file or WAR file that you generate as part of a separate build process by adding the following lines to .elasticbeanstalk/config.yml in your project folder:

deploy:   artifact: path/to/buildartifact.zip
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In ECS what are the two different launch types?

A

EC2 and Fargate. This means Fargate can’t use Container Instance IAM Role, that’s only for EC2. But Fargate tasks can use IAM Roles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to give an application in ECS using Fargate access to AWS resources? There are 4 different tasks that access different AWS resources.

A

Create 4 different IAM Roles with the required permissions and attach them to each of the 4 ECS tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A serverless application is using API Gateway with a non-proxy Lambda Integration. A developer was tasked to expose a GET method on a new /getcourses resource to invoke the Lambda function, which will allow the consumers to fetch a list of online courses in JSON format. The consumers must include a query string parameter named courseType in their request to get the data.

What is the MOST efficient solution that the developer should do to accomplish this requirement?

A

In this scenario, you have to enforce the use of a required courseType query string parameter in the /getcourses resource in API Gateway. In order to do this, you can configure the method request of your resource.

Hence, the correct answer is to configure the method request of the resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

With CodeDeploy what deployment type to use with Lambda?

A

Blue/Green (not in-place)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where can CodeDeploy deploy to?

A

Amazon EC2 instances, on-premises instances, serverless Lambda functions, or Amazon ECS services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where can application content be stored and then used by CodeDeploy?

A

Amazon S3 buckets, GitHub repositories, or Bitbucket repositories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two deployment types of CodeDeploy?

A

In-place and Blue/Green. But on-premises can’t use b/g

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the CodeDeploy agent used for?

A

The CodeDeploy agent is a software package that, when installed and configured on an instance, makes it possible for that instance to be used in CodeDeploy deployments. The CodeDeploy agent communicates outbound using HTTPS over port 443.

It is also important to note that the CodeDeploy agent is required only if you deploy to an EC2/On-Premises compute platform. The agent is not required for deployments that use the Amazon ECS or AWS Lambda compute platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How would you read records in the same order they are written to the Kinesis Data Stream? And prevent processing duplicates?

A

use PutRecord along with the SequenceNumberForOrdering parameter. And add a unique ID to each record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Cognito Identity pools used for?

A

They provide temporary AWS credentials for users who are guests (unauthenticated) and for users who have been authenticated and received a token. An identity pool is a store of user identity data specific to your account.

User Pools is for authentication. A guest would not be in the User Pool and couldn’t be authenticated. But they could be given credentials by being in the Identity pool.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What API call is used for someone using an API to interact with S3 using an IAM Role (maybe other AWS Services?) ?

A

AssumeRole

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A developer needs to configure the environment name, solution stack, and environment links of his application environment which will be hosted in Elastic Beanstalk. Which configuration file should the developer add in the source bundle to meet the above requirement?

A

env.yaml (maybe env.json also?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How would you add a custom configuation file in Elastic Beanstalk?

A

env.config, that are YAML- or JSON-formatted documents with a .config file extension that you place in a folder named .ebextensions and deploy in your application source bundle

17
Q

What is the Transform section in CloudFormation?

A

specifies the version of the AWS Serverless Application Model (AWS SAM) to use. When you specify a transform, you can use AWS SAM syntax to declare resources in your template. The model defines the syntax that you can use and how it is processed. More specifically, the AWS::Serverless transform, which is a macro hosted by AWS CloudFormation, takes an entire template written in the AWS Serverless Application Model (AWS SAM) syntax and transforms and expands it into a compliant AWS CloudFormation template.

18
Q

What is AWS AppSync?

A

AWS AppSync creates serverless GraphQL and Pub/Sub APIs that simplify application development through a single endpoint to securely query, update, or publish data.

GraphQL APIs built with AWS AppSync give frontend developers the ability to query multiple databases, microservices, and APIs from a single GraphQL endpoint.

Pub/Sub APIs built with AWS AppSync give frontend developers the ability to publish real-time data updates to subscribed API clients through serverless WebSocket connections.

19
Q

What is WebSocket API ?

A

you can create one In Amazon API Gateway, as a stateful frontend for an AWS service (such as
AWS Lambda or DynamoDB) or for an HTTP endpoint. The WebSocket API invokes the backend based on the
content of the messages that the API receives from client applications. Unlike a REST API, which receives and
responds to requests, a WebSocket API supports two-way communication between client applications and the
backend.

API Gateway WebSocket APIs are bidirectional. A client can send messages to a service, and services can independently send messages to clients. This bidirectional behavior enables richer client/service interactions because services can push data to clients without requiring clients to make an explicit request. WebSocket APIs are often used in real-time applications such as chat applications, collaboration platforms, multiplayer games, and financial trading platforms.

20
Q

What are the 3 supported authorizers for API Gateway?

A

IAM roles and policies (AWS_IAM), an Amazon Cognito user pool (COGNITO_USER_POOLS), or a Lambda authorizer (CUSTOM). or NONE to allow anyone to use it.

21
Q

What section must be added to a CloudFormation template to include resources defined by AWS SAM?

A

Transform

22
Q

A CloudFormation template will be used to create resources across multiple AWS accounts

A

Use CloudFormation StackSets

23
Q

In AWS Amplify Hosting, in which file do you add commands for unit tests?

A

amplify.yml

24
Q

A developer wants to release a new AWS ElasticBeanstalk application to 2 EC2 instances at a time while keeping full capacity.

A

Use Rolling with additional batch

25
Q

What is the Buildspec file?

A

CodeBuild uses the Buildspec file as a specification of build commands and settings. secrets-manager syntax can be used to retrieve API keys stored in AWS Secrets Manager.

26
Q

How to securely store keys/passwords with CodeBuild?

A

A valid way to use CodeBuild environment variables securely is to use secrets-manager syntax to retrieve API keys stored in AWS Secrets Manager. If secrets-manager syntax is not used, items would be in plain text.

27
Q

How can you share the VPC, public subnet, and security group ID in the first CF template so that they can be used in your second CF template?

A

Use the Export field in the Output section of mynetwork.yml.

The Export section can be used to export stack outputs so that they can be used by other templates.

28
Q
A