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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

What is Amazon Redshift?

🟥 The Complete Guide to AWS Redshift – Cloud Data Warehousing at Scale As the digital economy expands, the amount of data generated by businesses is growing…

Read More

What is Amazon Redshift and use cases of Amazon Redshift?

What is Amazon Redshift? If you’re in the world of big data, you’ve probably heard of Amazon Redshift. But what exactly is it? Simply put, Amazon Redshift…

Read More

What is Amazon SimpleDB?

Amazon one of the big name, offering its customers computing infrastructure through Amazon Web Services since 2006. Aims to use its own infrastructure to provide the building…

Read More

AWS Tutorials: FinOps – AWS Certificate Manager (ACM) & Private CA cost optimisation strategies

Pricing FAQ For AWS Private Certificate Authority Pricing for AWS Certificate Manager You are not subject to an additional charge for SSL/TLS certificates that you manage with…

Read More

AWS Tutorials: How to Shutdown (Stop / Start) Relational Database Service?

To shutdown (stop) and start a Relational Database Service (RDS) instance in AWS, you can follow these steps: Stopping an RDS Instance Starting an RDS Instance AWS…

Read More

What is AWS App Mesh and use cases of AWS App Mesh?

What is AWS App Mesh? AWS App Mesh is a service mesh offering from Amazon Web Services that facilitates communication and management of your microservices across multiple…

Read More