Skip to content

Deleted AMI public/private state

0

Hi,

I would like to know if an AMI that was created and then deleted by me was private or public. I know that there is a default "block public sharing" setting. But I don't really know the previous setting (now it says blocked, but I manually set that). I don't know the ami id. But I know it was created by me yesterday (june 23, 2024) in the sa-east-1 region and it was the only ami created by me that day.

The reason I need to know this is because that ami had sensitive data and I must know if it could have been compromised.

Thanks.

asked 2 years ago1K views

2 Answers
1

Hello.

You may be able to see the settings in CloudTrail's event history.
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/tutorial-event-history.html

Also, I don't think the AMI will be released publicly unless you follow the steps described in the document below.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html

EXPERT

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

  • Hi, I created the AMI using the web console. I know I haven't modified the ami after that. So, according to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html: To make an AMI public:

    1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
    2. In the navigation pane, choose AMIs.
    3. Select your AMI from the list, and then choose Actions, Edit AMI permissions.
    4. Under AMI availability, choose Public.
    5. Choose Save changes.

    it can't be made public while I create it? So, even if the setting was "allow public sharing", there's no way to share it on creation, and it can only made public after that editing "AMI permissions"?

  • Yes, with the current management console UI, it is not possible to publish the AMI publicly when creating it.

1

Unfortunately, definitively determining whether the AMI was public before deletion isn't possible without the AMI ID or access to AWS CloudTrail logs. However, here's how you can increase the likelihood of it being private:

Default Block Public Sharing: As you mentioned, the default setting for AMIs is to block public sharing. This means even if you didn't explicitly set it to private, there's a good chance it wasn't publicly accessible.

Single AMI Creation: Since you only created one AMI yesterday and manually set the visibility to blocked now, it further suggests the previous state was likely private.

Here's what you can do to investigate further:

Check AWS CloudTrail Logs (if enabled): CloudTrail logs all AWS API calls, including AMI creation and modification actions. If you have CloudTrail enabled in your account for the sa-east-1 region, you might be able to find a log entry for the AMI creation yesterday. This log entry would include details like the initial launch permission (public or private).

AWS

answered 2 years ago

AWS
EXPERT

reviewed 2 years ago

  • Hi, I found the ami id. Is that useful?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.