Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

aws-sam-deploy does not support s3_prefix argument

Deleted user March 3, 2020

Hello, 

i am trying to deploy my application via aws-sam-deploy , unfortunately it seems there is no s3 prefix argument support for that image.  Here is my pipeline config

 

```

- pipe: atlassian/aws-sam-deploy:0.3.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: x-dev

S3_PREFIX: subdir


STACK_NAME: x-dev
SAM_TEMPLATE: 'template.yaml'
CFN_TEMPLATE: 'packaged.yml'
CAPABILITIES: ['CAPABILITY_IAM', 'CAPABILITY_AUTO_EXPAND']
COMMAND: 'package-only'
WAIT: 'true'
DEBUG: 'true'

```

 

2 answers

0 votes
Johann Colombano December 5, 2022

works if you replace [default.package.parameters] by [default.global.parameters].
Here is a working example :

version=0.1
[default.global.parameters]
s3_prefix = "folder_prefix"
0 votes
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2020

Hi @[deleted] ,

Thank you for your feedback!

S3_BUCKET variable supports S3 bucket name or path-like directory structure.

S3_BUCKET: x-dev/subdir
Akhilesh singh Pilkhwal May 2, 2020

tried of giving subpath but pip giving an error
Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$"

Shirish_Veerabattini May 29, 2020

Yes, I'm in the same boat, need 

S3_PREFIX

support 

Shirish_Veerabattini May 29, 2020

until then I'll just use 

pip install -r requirements.txt 

sam build && sam package --args

Vlad Kalinin February 17, 2021

@Oleksandr Kyrdan the path-like directory structure doesn't appear to be working as expected, as per above comments. Is this a bug?

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2021

@Vlad Kalinin @[deleted] @Shirish_Veerabattini @Akhilesh singh Pilkhwal we developed this pipe to support samconfig.toml config, where you can write your requirements according to the doc https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html:

version=0.1
[default.package.parameters]
s3_prefix="my-prefix"

Regards, Galyna

Like Vlad Kalinin likes this
German Eduardo Melo Acosta December 20, 2021

@Galyna Zholtkevych  Please clarify, I'm using the sam cli config file, but the pipe ignore the configuration and don't use the s3-prefix

 here my config

version=0.1
[default.package.parameters]
s3_prefix = "bitbucket/"
s3_bucket = "prd-ott-management-datascience-hub"


here is my pipe command

name: Build SAM
oidc: true
script:
- pipe: atlassian/aws-sam-deploy:1.5.0
variables:
AWS_OIDC_ROLE_ARN: "arn:aws:iam::accountid:role/Role"
AWS_DEFAULT_REGION: 'us-east-1' # Optional if already defined in the context.
STACK_NAME: 'churn-ds-ml'
CAPABILITIES: ['CAPABILITY_IAM', 'CAPABILITY_AUTO_EXPAND'] # Optional.
SAM_TEMPLATE: './deploy/sam_template.yaml' # Optional.
WAIT: 'true'
WAIT_INTERVAL: 900
SAM_CONFIG: './deploy/samconfig.toml'
S3_BUCKET: 'prd-ott-management-datascience-hub'


Am I using something wrong? or is the s3 prefix still not working?

Thanks in advance for your information

Like Wes Fowlks likes this
Wes Fowlks June 28, 2022

I am also running into the same issue as @German Eduardo Melo Acosta

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events