Creating EC2 AMI and tagging associated snapshots issue via Lambda #268
-
Wondering if anyone else came across this issue I'm facing; We are using Lambda to create AMIs (based on certain EC2 tags) and setting tags (on the newly created AMI) based on the business requirements. Part of the function is also tagging the associated snapshots in which what we are finding out is that the Get-EC2Image -ImageId function returns null value (from Lambda) BUT if I would to run the same command with ID on a local machine, it returns the intended information. Please help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@justin-samuel Thanks for posting the question. Since the same command with the ID works locally for you, I'm assuming if it is permissions issue. Could you please check if below helps:
Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@justin-samuel Thanks for posting the question. Since the same command with the ID works locally for you, I'm assuming if it is permissions issue. Could you please check if below helps:
ec2:DescribeImages
permission policy attached to it? If not, attach this policy to the Lambda IAM role.-Verbose
flag with your CmdLet and share the detailed output?Thanks,
Ashish