Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,871
Community Members
 
Community Events
168
Community Groups

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'

```

 

1 answer

0 votes

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?

@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

Atlassian Community Events