aws / aws/aws-sam-cli

sam pipeline github action errors\issues

Open
#5,966 6 comments 0 reactions 0 assignees View on GitHub
type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Description:
When using sam pipeline on a new project from the python template (have not checked other languages) there is 2 issues

1. When you initialize a project with sam init the default samconfig.toml includes the following
[default.deploy.parameters]
resolve_s3 = true

[default.package.parameters]
resolve_s3 = true

during the 'build and package' phase it will results in the following error in the github action
Error: Cannot use both --resolve-s3 and --s3-bucket parameters. Please use only one.
Error: Process completed with exit code 1.

Removing the 2 "resolve_s3 = true" lines resolves the issue

2. On a new project "confirm_changeset = true" when you use sam pipelines this will result in the testing phase reporting:
Aborted!
Deploy this changeset? [y/N]:
Error: Process completed with exit code 1.

3. This isn't a bug but I cannot figure out how to add parameter_overrides to pipelines using toml files. I tried adding it to [staging.pipeline_bootstrap.parameters] in pipelineconfg.toml i tried adding [staging.deploy.parameters] and [staging.pipeline_bootstrap.parameters] in samconfig.toml but nothing seemed to work. I can see that I can edit the github action script to add parameters but I feel like there is a better way?

Ideally when you run **sam pipeline init** it should prompt you to override parameters at each stage similar to sam build.

### Steps to reproduce:
sam init
1 - AWS Quick Start Templates
1 - Hello World Example
yes to Python and Zip
no to X-Ray
sam pipeline init --bootstrap
select github actions

### Observed result:
The github actions fail with the errors mentioned in points 1 and 2

### Expected result:
After initializing a new project sam pipelines should work without errors

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
{
"version": "1.97.0",
"system": {
"python": "3.11.5",
"os": "macOS-13.5.2-x86_64-i386-64bit"
},
"additional_dependencies": {
"docker_engine": "24.0.6",
"aws_cdk": "2.53.0 (build 7690f43)",
"terraform": "1.5.7"
},
"available_beta_feature_env_vars": [
"SAM_CLI_BETA_FEATURES",
"SAM_CLI_BETA_BUILD_PERFORMANCE",
"SAM_CLI_BETA_TERRAFORM_SUPPORT",
"SAM_CLI_BETA_RUST_CARGO_LAMBDA"
]
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.