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

Zappa tries to create new S3 bucket when it can't access the already existing one #1315

Open
lmuther8 opened this issue Mar 29, 2024 · 2 comments · May be fixed by #1316
Open

Zappa tries to create new S3 bucket when it can't access the already existing one #1315

lmuther8 opened this issue Mar 29, 2024 · 2 comments · May be fixed by #1316
Labels
needs-review Needs attention from a maintainer

Comments

@lmuther8
Copy link
Contributor

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

  1. Successfully deploy a zappa project
  2. 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:::*/*"
            ]
        }
    ]
}
  1. Call zappa update {{stage}}

Your Environment

  • Zappa version used: 0.58.0
  • Operating System and Python version: MacOS Python 3.11
@lmuther8 lmuther8 linked a pull request Mar 29, 2024 that will close this issue
Copy link

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

@github-actions github-actions bot added the no-activity [Bot] Closing soon if no new activity label Jun 27, 2024
@lmuther8
Copy link
Contributor Author

lmuther8 commented Jul 6, 2024

This issue still exists

@github-actions github-actions bot added needs-review Needs attention from a maintainer and removed no-activity [Bot] Closing soon if no new activity labels Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Needs attention from a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant