Deployment Flashcards
What is the correct way to deploy the new version to Elastic Beanstalk via the CLI?
Package your application as a zip file and deploy it using the ‘eb deploy’ command.
What does the update-application command in elastic beanstalk do?
just updates the specified properties of the application. This command does not allow you to upload packages to Elastic Beanstalk.
What types of files can EB CLI deploy?
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
In ECS what are the two different launch types?
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 to give an application in ECS using Fargate access to AWS resources? There are 4 different tasks that access different AWS resources.
Create 4 different IAM Roles with the required permissions and attach them to each of the 4 ECS tasks.
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?
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.
With CodeDeploy what deployment type to use with Lambda?
Blue/Green (not in-place)
Where can CodeDeploy deploy to?
Amazon EC2 instances, on-premises instances, serverless Lambda functions, or Amazon ECS services.
Where can application content be stored and then used by CodeDeploy?
Amazon S3 buckets, GitHub repositories, or Bitbucket repositories.
What are the two deployment types of CodeDeploy?
In-place and Blue/Green. But on-premises can’t use b/g
What is the CodeDeploy agent used for?
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 would you read records in the same order they are written to the Kinesis Data Stream? And prevent processing duplicates?
use PutRecord along with the SequenceNumberForOrdering parameter. And add a unique ID to each record.
What is Cognito Identity pools used for?
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.
What API call is used for someone using an API to interact with S3 using an IAM Role (maybe other AWS Services?) ?
AssumeRole
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?
env.yaml (maybe env.json also?)
How would you add a custom configuation file in Elastic Beanstalk?
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
What is the Transform section in CloudFormation?
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.
What is AWS AppSync?
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.
What is WebSocket API ?
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.
What are the 3 supported authorizers for API Gateway?
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.
What section must be added to a CloudFormation template to include resources defined by AWS SAM?
Transform
A CloudFormation template will be used to create resources across multiple AWS accounts
Use CloudFormation StackSets
In AWS Amplify Hosting, in which file do you add commands for unit tests?
amplify.yml
A developer wants to release a new AWS ElasticBeanstalk application to 2 EC2 instances at a time while keeping full capacity.
Use Rolling with additional batch
What is the Buildspec file?
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.
How to securely store keys/passwords with CodeBuild?
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.
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?
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.