exam questions

Exam AWS-SysOps All Questions

View all questions & answers for the AWS-SysOps exam

Exam AWS-SysOps topic 1 question 693 discussion

Exam question from Amazon's AWS-SysOps
Question #: 693
Topic #: 1
[All AWS-SysOps Questions]

A SysOps Administrator has written an AWS Lambda function to launch new Amazon EC2 instances and deployed it in the us-east-1 region. The Administrator tested it by launching a new t2.nano instance in the us-east-1 region and it performed as expected. However, when the region name was updated in the Lambda function to launch an EC2 instance in the us-west-1 region, it failed.
What is causing this error?

  • A. The AMI ID must be updated for the us-west-1 region in the Lambda function as well
  • B. The Lambda function can only launch EC2 instances in the same region where it is deployed
  • C. The Lambda function does not have the necessary IAM permission to launch more than one EC2 instance
  • D. The instance type defined in the Lambda function is not available in the us-west-1 region
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ka
Highly Voted 2 years, 7 months ago
I give my answer to A after long research AMI ID are unique across regions even with AMI we share. https://stackoverflow.com/questions/26727401/how-to-find-the-same-spec-ami-in-different-regions Lambda can call upon services in another region https://stackoverflow.com/questions/31714788/can-an-aws-lambda-function-call-another
upvoted 20 times
...
smplysam
Highly Voted 2 years, 7 months ago
A is the right answer, since AMI IDs are unique across regions. B - You can pass region parameter in the lambda function to launch the EC2 in a different region.
upvoted 9 times
...
albert_kuo
Most Recent 9 months, 3 weeks ago
Selected Answer: A
When you update the region name in the Lambda function to launch an EC2 instance in a different region, you need to ensure that the AMI ID specified in the Lambda function is valid for the new region.
upvoted 1 times
...
RicardoD
2 years, 5 months ago
A is the answer AMI should be updated according to the region
upvoted 1 times
...
Kimle
2 years, 6 months ago
A as per below lambda can run across region https://stackoverflow.com/questions/48250426/invoke-an-aws-lambda-across-regions
upvoted 1 times
...
abhishek_m_86
2 years, 6 months ago
A. The AMI ID must be updated for the us-west-1 region in the Lambda function as well Seem correct
upvoted 2 times
...
Farina
2 years, 6 months ago
My answer is A. Keyword here "when the region name was updated in the Lambda function to launch an EC2 instance in the us-west-1 region, it failed". Region named was updated and only left AMI ID to be updated in Lambda
upvoted 1 times
...
kenkct
2 years, 6 months ago
A: only answer with Keyword AMI
upvoted 1 times
...
jackdryan
2 years, 6 months ago
I'll go with A
upvoted 1 times
...
waterzhong
2 years, 6 months ago
A - it would seem that they are not asking about Lambda but rather about the AMI. And AMI ID's are not the same across regions
upvoted 4 times
...
iamsajal
2 years, 6 months ago
Code like this will be used in lambda and it is clear that it is problem of AMI ID. import boto3 region = 'us-west-1' instances = ['i-12345cb6de4f78g9h', 'i-08ce9b2d7eccf6d26'] ec2 = boto3.client('ec2', region_name=region) def lambda_handler(event, context): ec2.start_instances(InstanceIds=instances) print('started your instances: ' + str(instances))
upvoted 2 times
...
AWS_Noob
2 years, 6 months ago
A - it would seem that they are not asking about Lambda but rather about the AMI. And AMI ID's are not the same across regions
upvoted 5 times
...
amo82
2 years, 6 months ago
lambda is a regional service
upvoted 1 times
...
Prabaharan
2 years, 7 months ago
Answer C clearly mentioned in the blog https://www.bluepiit.com/blog/how-to-automate-copying-an-ec2-amis-from-one-aws-region-to-another-cleanup-using-aws-lambda/ e region. In this blog-post, by keeping above points in mind, let us take you through the steps involved in automating the copying of AMI to a different region and tag those with the retention date and clean up them based on the retention expiration date (if needed) using AWS Lambda. The process generally comprises the following steps: Setup IAM Permissions. Create Lambda Copy AMI across Region Function. Create Lambda Cleanup Copied AMI Function. Schedule Functions.
upvoted 1 times
...
saumenP
2 years, 7 months ago
B seems to be correct
upvoted 5 times
...
mukeshs
2 years, 7 months ago
Ans is A
upvoted 1 times
...
dkp
2 years, 7 months ago
Ans is B: Lambda function is regions specific and they are trying to use us-east lambda function to launch in West which is not possible
upvoted 2 times
shammous
2 years, 6 months ago
Not true: lambda can be configured to launch an EC2 instance in any region through lambda@edge. Answer A is probably the right answer.
upvoted 1 times
...
Phil31
2 years, 6 months ago
Answer B is ambiguous. Yes lambda is a regional service. But answer B says that the Lambda function can only launch EC2 instances in the region where it is deployed. This is not entirely true, because it is possible to execute code in AWS Lambda worldwide using Lambda@edge. I would choose answer A because it is sure that it is necessary to update the AMI ID if the lambda function is executed in another region. https://aws.amazon.com/lambda/faqs/?nc1=h_ls
upvoted 13 times
...
karmaah
2 years, 7 months ago
Looks Valid Point.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago