- 
                Notifications
    
You must be signed in to change notification settings  - Fork 376
 
Open
Labels
needs-reviewNeeds attention from a maintainerNeeds attention from a maintainer
Description
Context
If a user calls zappa update {{stage}} without the AWS s3:ListBucket permission the upload_to_s3 function in core.py it tries to create a new bucket instead of alerting the person they cannot access the bucket.
Expected Behavior
The zappa update {{stage}} call should error out and alert the user they cannot access the bucket they are trying to.
Actual Behavior
The zappa update {{stage}} continues and creates a new s3 bucket or, in my case errors out because the does not have permission to create a new S3 bucket.
Steps to Reproduce
- Successfully deploy a zappa project
 - Create an AWS user or role with the following permissions.
 
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "logs:UpdateLogDelivery",
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "lambda:UpdateFunctionCode",
                "s3:PutObject",
                "s3:GetObject",
                "lambda:GetFunction"
            ],
            "Resource": [
                "arn:aws:lambda:*:<account>:function:*",
                "arn:aws:s3:::*/*"
            ]
        }
    ]
}
- Call 
zappa update {{stage}} 
Your Environment
- Zappa version used: 0.58.0
 - Operating System and Python version: MacOS Python 3.11
 
Metadata
Metadata
Assignees
Labels
needs-reviewNeeds attention from a maintainerNeeds attention from a maintainer