Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

AWS Interview Questions and Answer Part – 20

Which of the following options describes Infrastructure in Code?

  • Script containing all needed steps to transform current state into target state.
  • Checklist containing all steps needed to transform current state into target state manually.
  • Blueprint containing target state. Tool transforming current sate into target state. (Ans)

CloudFormation allows you to __ a stack.

  • create, update, and delete (Ans)
  • create and update
  • create

A minimal CloudFormation template contains:

  • Format Version, Description, Resources (Ans)
  • Resources, Inputs, Outputs
  • Resources

A resource definition consists of:

  • Identifier, Type, Properties (Ans)
  • Ordinal Number, Identifier, Properties
  • Type, Properties

The following resources describe…

“Resources”: {
“EC2Instance”: {
“Type”: “AWS::EC2::Instance”,
“Properties”: {
“ImageId”: “ami-bff32ccc”,
“InstanceType”: “t2.nano”
}
}
}

  • a S3 Bucket.
  • an EC2 Instance. (Ans)
  • a RDS Database Instance.
  • an AMI.

Which value is valid for the following parameter?

“Parameters”: {
“VPC”: {
“Description”: “The default VPC”,
“Type”: “AWS::EC2::VPC::Id”
}
}

  • vpc-ssh-bastion-host (Ans)
  • vpc-6b53320e
  • subnet-e16fa6ca

Which of the following options adds the private IP address of the EC2 instance to the outputs?

{
“Resources”: {
“EC2Instance”: {
“Type”: “AWS::EC2::Instance”
},
},
“Outputs”: {
“PrivateIp”: {
“Value”: {“Fn::GetAtt”: [“EC2Instance”, “PrivateIp”]}
}
}
}

  • {“Ref”: “EC2Instance”}
  • {“Ref”: [“EC2Instance”, “PrivateIp”]}
  • {“Fn::GetAtt”: [“EC2Instance”, “PrivateIp”]} (Ans)

A CloudFormation template includes the following mappings section.

“Mappings”: {
“RegionAMI”: {
“us-east-1”: {“AmazonLinux”: “ami-8fcee4e5”, “Ubuntu”: “ami-fce3c696”},
“eu-west-1”: {“AmazonLinux”: “ami-e1398992”, “Ubuntu”: “ami-f95ef58a”},
“ap-northeast-1”: {“AmazonLinux”: “ami-59bdb937”, “Ubuntu”: “ami-a21529cc”}
}
}

What’s the output of the following function?

{“Fn::FindInMap”: [“RegionAMI”, “eu-west-1”, “AmazonLinux”]}

  • ami-e1398992 (Ans)
  • ami-f95ef58a
  • Nothing, the parameters are invalid.
  • ami-59bdb937

A stack named webapp was created in region eu-west-1. What’s the output of the following function?

{“Fn::Select”: [“0”, {“Fn::GetAZs”: {“Ref”: “AWS::Region”}}

  • az-1
  • eu-west-1a (Ans)
  • eu-west-1

CloudFormation parameters allow you to:

  • Add additional properties to resources without changing the template
  • Create multiple stacks based on the same template
  • Specify input for a template when creating or updating a stack (Ans)

What’s wrong with the described EC2 instance?

“EC2Instance”: {
“Type”: “AWS::EC2::Instance”,
“Properties”: {
…
“UserData”: {“Fn::Join”: [“\n”, [
“#!/bin/bash -ex”,
“yum install -y httpd”,
“cd /var/www/html”,
“echo ‘Hello World!’ > index.html”,
“service httpd start”
]]}
}
}

  • User Data is limited to 128 characters.
  • There is no package called httpd.
  • User Data needs to be encoded in Base64. (Ans)

A CloudFormation template is written in…

  • Bash Script
  • XML
  • JavaScript
  • JSON (Ans)

Which of the following is true of ECS?

  • ECS automatically launches a fully-managed EC2 instance for every cluster created.
  • At the cluster level, ECS can only be managed from the browser-based console.
  • Besides for the regular AWS resources in use, ECS charges users on a per-cluster basis.
  • ECS offers integration with either the ECS registry or Docker Hub images. (Ans)

You can display detailed information about an ECS cluster from the command line using…

  • aws ecs clusters –list
  • aws ecs list-clusters
  • aws ecs describe-clusters (Ans)
  • aws ecs cluster –help

You can set load balancing and auto scaling for a deployment in the __ configuration menu of the console.

  • Container (Ans)
  • Services
  • Cluster Update
  • Task Definitions

Which of the following commands will return authentication credentials for the EC2 Container Repository service?

  • aws ecr login –region
  • aws get-login –region
  • aws ecr get-login –region (Ans)
  • aws get-region

Adding the “Amazon EC2 Container Service for EC2 Role” to your EC2 instance allows _.

  • the EC2 instance to be registered within an ECS system
  • the account root user to manage the EC2 instance
  • ECS resources to connect to the EC2 instance
  • the EC2 instance to connect to ECS resources (Ans)

Which of the following files on an EC2 ECS-optimized AMI instance must be edited to permit access to Docker Hub private repositories?

  • /ecs/ecs.config
  • /etc/ecs/ecs-config
  • /etc/ecs-config
  • /etc/ecs/ecs.config (Ans)

What is the primary purpose of adding a tag to a Docker image?

  • To allow for easier visual identification once your infrastructure grows
  • To direct Docker to the appropriate remote repository (Ans)
  • To identify the object as an image
  • To identify the image’s ownership and origin

For security, the Docker website uses encryption certificates to _.

  • ensure that all images uploaded to Docker Hub are free of malware
  • secure the computers of local Docker clients
  • ensure that all “docker run” operations are valid
  • secure connections between the website and clients (Ans)

What is the role of apache2ctl in this command?
docker run -d -p 80:80 webserver /usr/sbin/apache2ctl -D FOREGROUND

  • apache2ctl will check to make sure the Apache webserve software package is properly installed on a container.
  • apache2ctl is the name of a Docker image.
  • apache2tcl will run the Apache webserver software package when the container boots. (Ans)
  • apache2ctl will launch a new Docker container as a backend server to your main container.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

AWS CLI Credentials Setup: Configure, Verify, and Secure Access

Learn how to configure AWS credentials with the AWS CLI, verify your identity, and understand where credentials are stored. This updated guide also compares profiles, environment variables, and role-based access.

Read More

Provision an AWS EC2 Instance with Chef (Legacy ChefDK Workflow)

A practical, step-by-step walkthrough for provisioning an AWS EC2 VM using the classic ChefDK and chef-provisioning approach. Includes workflow, commands, recipe examples, and validation checks for legacy environments.

Read More

EC2 Boot from EBS Explained: Architecture, Trade-offs, and an AWS CLI Workflow

Booting Amazon EC2 instances from Amazon EBS was a major shift from ephemeral root disks to persistent root volumes. This guide explains what changed, why it mattered, and how to use the model safely in modern operations.

Read More

Deploying Java EE on Amazon EC2 with EC2Deploy: Workflow, Script, and Modern Lessons

This revised guide breaks down the original EC2Deploy approach for provisioning EC2 instances, deploying Java EE apps, and running JMeter tests. It also maps the same deployment pattern to modern DevOps practices.

Read More

EC2Deploy and the Cloud Tools Maven Plugin: Architecture, Goals, and Deployment Workflow

This revised guide explains what the 2010 EC2Deploy and Cloud Tools release actually introduced, how its components fit together, and how the Maven goals map to deployment operations on EC2. It also covers what modern teams should verify before relying on this legacy toolchain.

Read More

Cloud Tools Adds Amazon EBS Support: Durable EC2 Storage for Database Workloads

This historical update covers when Cloud Tools introduced Amazon EBS support for EC2 applications, including database-backed deployments. It explains the supported storage modes, the backup/restore flow, and practical command-level equivalents.

Read More