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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

aws-sam-deploy does not support s3_prefix argument

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

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.
Apr 26, 2020

Hi @fatih_cebeci ,

Thank you for your feedback!

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

S3_BUCKET: x-dev/subdir

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

Yes, I'm in the same boat, need 

S3_PREFIX

support 

until then I'll just use 

pip install -r requirements.txt 

sam build && sam package --args

@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 • edited

@Vlad Kalinin @fatih_cebeci @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

@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

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