Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static website: Deployment IAM permissions #111

Open
ondrejmirtes opened this issue Oct 5, 2021 · 2 comments
Open

Static website: Deployment IAM permissions #111

ondrejmirtes opened this issue Oct 5, 2021 · 2 comments

Comments

@ondrejmirtes
Copy link

Hi,
I really appreciate how Lift helps me to remove some repeating work when deploying a static website, but one chore still remains - creating an AWS IAM user with the right permissions to deploy the site from my CI/CD pipeline.

What I usually do is a trial-and-error procedure of creating a user and adding more and more permissions until my deployment is successful. Is there an easier way? Is it documented?

Thank you!

@t-richard
Copy link
Contributor

I've went through the same process and can't agree more.

IAM is complex and IMO Serverless Framework does a poor job at pointing you in the right direction (or I'm not aware of it). They even recommend creating a user with Administrator Access in there docs.

I'm not sure what's the best practise in this field right now but what I've done so far is generating a user with the least permissions I can come up with. And yes this is trial & error each time.

I also know you can make Cloudformation assume a role when deploying but that wouldn't help with your static files upload problem here.

I think the required permissions to use and deploy a construct could be documented but there would still be a missing piece in Serverless Framework.

It would be nice for serverless framework to have a command that looks at what would be deployed and generates the proper IAM permission document for deployment (and them sending an event so that Lift can hook into the process and add its own to the mix).

Hope that makes sense. Would love to hear thoughts on this.

@mnapoli
Copy link
Member

mnapoli commented Oct 5, 2021

Yes, yes and yes.

We've discussed it several times internally at Serverless, and it's a tough problem to solve. No tools, as far as we know, has a magic solution for this.

One idea we may want to explore is:

  • let each construct expose the permissions it requires
  • then there would be a command that lets user export those permissions (useful for reviewing as well), even before deploying
  • on deployment, it could even be great if Lift/Serverless Framework would check the permissions before deploying to anticipate any failure

But, as you can guess, this is a lot of work. I'm curious what you think about that approach, or if you have anything else in mind.

For those stumbling on this discussion feel free to add a 👍 to the issue: that helps us gauge interest and prioritize the roadmap.

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

No branches or pull requests

3 participants