question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`sam deploy` does not use specified S3 bucket in samconfig.toml

See original GitHub issue

Description:

Attempting to use a previously configured S3 bucket for deployments by specifying the s3_bucket parameter in the samconfig.toml does not work.

Steps to reproduce:

  1. Create an S3 bucket with the same bucket policy as the SAM CLI’s dynamically created default source bucket.
  2. Update your samconfig.toml to include this new bucket’s ARN: s3_bucket = "arn:aws:s3:::bucket-name" (although I tried with the bucket name as well)
  3. Run sam build --guided.

Observed result:

Note the Deployment s3 bucket in the output provided:

Deploying with following values
===============================
Stack name                         : process-lambda
Region                                 : us-east-1
Confirm changeset            : True
Deployment image repository  : 
                                       {
                                           "ProcessFunction": "834609584094.dkr.ecr.us-east-1.amazonaws.com/dev-scrb-process"
                                       }
Deployment s3 bucket         : aws-sam-cli-managed-default-samclisourcebucket-1w6spftg6a31d <<<<
Capabilities                           : ["CAPABILITY_IAM"]
Parameter overrides            : {}
Signing Profiles                    : {}

Expected result:

The Deployment s3 bucket should use the supplied s3_bucket value configured in the samconfig.toml file (either arn:aws:s3:::bucket-name or bucket-name.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS:MacOS
  2. SAM CLI, version 1.17.0
  3. AWS region: us-east-1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Jaccocommented, Feb 8, 2021

Current SAM version is 1.34.0. Have you tried upgrading?

0reactions
warrior8792commented, Dec 1, 2022

I believe this still exists in SAM CLI v1.66.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS SAM CLI configuration file
The AWS SAM CLI uses TOML tables to group configuration entries by environment and command. A single configuration file can contain tables for...
Read more >
sam package - Amazon Serverless Application Model
You can use the sam deploy command directly to package and deploy your ... If this option is not specified, then Amazon SAM...
Read more >
Deploying AWS Lambda "Hello World" using sam init ...
You gave confirm change set value as false. you have to give that as true. Can you try giving these values while deploying?...
Read more >
AWS SAM Deploy Missing option '--image-repository'...
If I understand you correctly, `image_repositories` has to be specified in both `aws-lambda-deploy` pipe and `samconfig.toml`?. I am deploying to Lambda using ......
Read more >
An Introduction to AWS Serverless Application Model
This SAM template is used to deploy the application to AWS. During deployment ... A different default S3 bucket can be set in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found