aws-samples / aws-serverless-workshop-innovator-island

Welcome to the Innovator Island serverless workshop! This repo contains all the instructions and code you need to complete the workshop.
MIT No Attribution
564 stars 228 forks source link

Module 1: Access denied when trying to use the S3 bucket #35

Closed lkreimann closed 4 years ago

lkreimann commented 4 years ago

Not sure if that's an issue with my account or something similar but maybe somebody is able to help me here: I'm currently stuck on step 5 of the Backend part in module 1. I successfully created an S3 deployment bucket and I can see it was created in the AWS Control Management Console (when I navigate to S3). But every time I enter the first commands from step 5 ... sam package --output-template-file packaged.yaml --s3-bucket $s3_deploy_bucket

... I get an error like this:

Error: Unable to upload artifact fatController/ referenced by CodeUri parameter of UpdateRides resource. An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

I read this article: https://aws.amazon.com/de/premiumsupport/knowledge-center/s3-access-denied-bucket-policy/ But I can't find any IAM roles, that have anything to do with S3 (there are new roles for Cloud9 and Amplify though). But I'm not sure if you need such a rule at all for S3.

When looking at the settings of the S3 Bucket, my user has full rights to read and write to the bucket. Maybe Cloud9 doesn't have the needed permissions (if that matters).

Any idea what's wrong here? I'm not sure what to do (being a complete newbie to AWS and all).

jbesw commented 4 years ago

Hi Lea! Did complete all of the steps in module 1 (setup)? Also, are you using a personal account with administrator access to AWS to access the resources? You may also find the video series useful for getting started: https://www.youtube.com/watch?v=uLTRI0ijmjw&list=PL1ImQiKrb9LCLqQWkIxMN7Tg8zqAcYmA2.

lkreimann commented 4 years ago

I did complete all the steps from the setup. I'm not using a personal account and I guess that's the problem :( The video is exactly how I followed the tutorial, along with the READMEs in this repo. I guess my issue is nothing anyone here can help me, I'm going to close it. Thanks anyway!

AmandaOlearczuk commented 3 years ago

@Ikreimann I have the same problem.

I did complete all the steps from the setup. I'm not using a personal account and I guess that's the problem :( The video is exactly how I followed the tutorial, along with the READMEs in this repo. I guess my issue is nothing anyone here can help me, I'm going to close it. Thanks anyway!

I have the same problem. Did you manage to fix it?

jbesw commented 3 years ago

Hi Amanda! Can you confirm that:

  1. You have an account login with full administrator access.
  2. Your CLI is configured with a role that has Administrator access? The SAM CLI will use this to build the resources in the workshop.