Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to host an AMI in the Amazon Marketplace. i need to get the type of instance, whenever some user launches the AMI., like if its small medium or large. based on that i need to make some changes in the AMI when its created. I can do this with Amazon API call, to get the instance type, but the problem is that the instances created with the AMI will be started by other users, and i cannot use my AWS Credentials in the Amazon API.

Is there any way that i can create an anonymous readonly user to make only specific type of EC2 API Calls? Or can i encrypt my EC2 API credentials, so no one can use it?

share|improve this question
up vote 2 down vote accepted

If you just need the instance-type then you can write code/script which browse the URL '' which returns the instance-type. It doesn't requires AWS account credentials.


share|improve this answer
This should be the accepted answer. Much better way of doing it. Faster and easier. – ceejayoz Sep 5 '12 at 18:39

You can use IAM to create a read-only user. This is simple, you need to create the user in IAM via the AWS console, then you need to assign it a Policy, the policy should say it's a read-only user.

share|improve this answer
but readonly user wont be able to make other API Calls as well? which are sensitive and its information should not be disclosed? actually i want a way to ONLY call this single function, and block all other calls. – Farhan Sep 3 '12 at 8:58
You can create an Advanced Policy by selecting what exactly you need to use and not allow everything else in such a case. As for the encryption - calls to the API are done via https, thus the information flow is encrypted. – Logic Wreck Sep 3 '12 at 9:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.