# How do I integrate with AWS IAM?

**URL:** <https://community.fly.io/t/how-do-i-integrate-with-aws-iam/2484>\
**Category:** Questions / Help\
**Created:** [September 10, 2021, 8:46am UTC](https://community.fly.io/t/how-do-i-integrate-with-aws-iam/2484 "2021-09-10T08:46:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuhinnair444](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/tuhinnair444/32/2017_2.png) [@tuhinnair444](https://community.fly.io/u/tuhinnair444)\
**Post date:** [September 10, 2021, 8:46am UTC](https://community.fly.io/t/how-do-i-integrate-with-aws-iam/2484/1 "2021-09-10T08:46:58Z")

</div>

Hey, sorry if this isn’t exactly [Fly.io](http://Fly.io) specific but I’d like to know how I’d authenticate my [Fly.io](http://Fly.io) intances with AWS?

For example, currently my application runs on EC2/Lambda and I have IAM policies defined on the resources that let me authorize and interact with other AWS services. What would that look like if I moved my applications to [Fly.io](http://Fly.io)?

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [September 10, 2021, 12:32pm UTC](https://community.fly.io/t/how-do-i-integrate-with-aws-iam/2484/2 "2021-09-10T12:32:17Z")

</div>

Since Fly is outside AWS you would need to create a user within the AWS console. You attach to that user the IAM policies your EC2/Lambda role has. So that user would have the same access to your AWS resources

Creating that user (with programmatic access) will give you these values you will need:

- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`

You would then set those as secrets within Fly so they are safely encrypted [Secrets and Fly Apps · Fly](https://fly.io/docs/reference/secrets/)

That would make them available to your app as environment variables which the relevant AWS SDK would then see and use. For example for nodejs [Loading credentials in Node.js from environment variables - AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html)

---

<div class="post-metadata">

**Author:** ![tuhinnair444](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/tuhinnair444/32/2017_2.png) [@tuhinnair444](https://community.fly.io/u/tuhinnair444)\
**Post date:** [September 10, 2021, 2:20pm UTC](https://community.fly.io/t/how-do-i-integrate-with-aws-iam/2484/3 "2021-09-10T14:20:48Z")

</div>

Thanks Greg!
