Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

S3 Blobstore: can I use IAM instance profile instead of supplying key/secret? #4303

Closed
artemave opened this issue Dec 11, 2017 · 6 comments
Closed

Comments

@artemave
Copy link

The reason for that is that IAM instance profile access can scripted in cloud formation template.

@dereke
Copy link

dereke commented Dec 11, 2017

to clarify the EC2 instance has an IAM role assigned to it so can access S3 without needing credentials, I think all that flynn needs to be able to do is to disable the check for the credentials.

@titanous
Copy link
Contributor

Try ec2_role=true instead of access_key_id/secret_access_key. I'm not sure when it was tested last, but the intention was that this should work:

flynn -a blobstore env set BACKEND_S3MAIN="backend=s3 region=us-east-1 ec2_role=true bucket=flynnblobstore"

@artemave
Copy link
Author

Nice one!

This got me further but still not quite all the way there:

[2017-12-11T17:45:01.02021Z]     2017/12/11 17:45:01 blobstore: error checking S3 bucket "bs-pr-apps-flynn-stack-flynnblobstore-16u5r9o614986" existence, ensure that it exists and these actions are authorized: s3:ListBucket, s3:PutObject, s3:GetObject, s3:DeleteObject, s3:ListMultipartUploadParts, s3:AbortMultipartUpload, s3:ListBucketMultipartUploads; RequestError: send request failed
[2017-12-11T17:45:01.020273Z]    caused by: Head https://bs-pr-apps-flynn-stack-flynnblobstore-16u5r9o614986.s3-eu-west-1a.amazonaws.com/: dial tcp: lookup bs-pr-apps-flynn-stack-flynnblobstore-16u5r9o614986.s3-eu-west-1a.amazonaws.com on 100.100.48.1:53: no such host

@titanous
Copy link
Contributor

Drop -1a from the region.

@artemave
Copy link
Author

Dropping -1a didn't work, but dropping a did!

apps@LONAGENT03:~$ flynn -a blobstore env set BACKEND_S3MAIN="backend=s3 region=eu-west-1 bucket=bs-pr-apps-flynn-stack-flynnblobstore-16u5r9o614986 ec2_role=true"
Created release 70c303f6-53c2-415b-8ca5-8da1e749c5b6.

Thanks a lot! Is there a documentation that describes ec2_role=true trick (and perhaps some others too)?

@dereke
Copy link

dereke commented Dec 11, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants