# Developing on AWS

IAM role and policy&#x20;

<figure><img src="https://604868167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQ9IWUW0VjkKLJPOeTIP3%2Fuploads%2FTJc83kGV976BYIQ1saKK%2Fimage.png?alt=media&#x26;token=a65deacc-b4dd-45ea-b2df-01852cf2d6bc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://604868167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQ9IWUW0VjkKLJPOeTIP3%2Fuploads%2Ftpj7mx2NPkXK8VOd0OCK%2Fimage.png?alt=media&#x26;token=0b67aa31-a132-4afb-bd75-d97b99505fa0" alt=""><figcaption><p>'</p></figcaption></figure>

**or other you can create the policy aws policy generator**



**if you want to test you created role you can use the aws simulator policy**

[**https://policysim.aws.amazon.com/home/index.jsp?#**](https://policysim.aws.amazon.com/home/index.jsp?)

&#x20;





AWS EC2 Instance Metadata&#x20;

• AWS EC2 Instance Metadata is powerful but one of the least known features to developers&#x20;

• It allows AWS EC2 instances to ”learn about themselves” without using an IAM Role for that purpose.&#x20;

• The URL is http://169.254.169.254/latest/meta-data&#x20;

• You can retrieve the IAM Role name from the metadata, but you CANNOT retrieve the IAM Policy. • Metadata = Info about the EC2 instance&#x20;

• Userdata = launch script of the EC2 instance&#x20;

• Let’s practice and see what we can do with it!



AWS SDK Overview&#x20;

• What if you want to perform actions on AWS directly from your applications code ? (without using the CLI).&#x20;

• You can use an SDK (software development kit) !&#x20;

**• Official SDKs are…**

&#x20;• Java&#x20;

• .NET&#x20;

• Node.js

&#x20;• PHP&#x20;

• Python (named boto3 / botocore)&#x20;

• Go&#x20;

• Ruby&#x20;

• C++



## AWS SDK Overview&#x20;

• We have to use the AWS SDK when coding against AWS Services such as DynamoDB&#x20;

• Fun fact… the AWS CLI uses the Python SDK (boto3)&#x20;

• The exam expects you to know when you should use an SDK&#x20;

• We’ll practice the AWS SDK when we get to the Lambda functions&#x20;

• Good to know: if you don’t specify or configure a default region, then us-east-1 will be chosen by default
