In aws-sam-deploy pipe, can the lambda uploaded to S3 with a lambda function name?

Chyn January 28, 2021

In pipe - aws-sam-deploy package-only, can we have option to put the lambda function name as prefix automatically before upload the zip file to S3?

Ex. Instead of "12af3377de8d9c743192c0182f3b7322" in the S3, can we have "my-lambda-name-12af3377de8d9c743192c0182f3b7322" in S3 ? 

This will ease the maintenance of the bucket.  

1 answer

1 accepted

1 vote
Answer accepted
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2021

@Chynthanks for the question!

sam package has the parameter in cli --s3-prefix, and if to pass there this prefix, it creates the folder with s3-prefix name in the root and inside that folder there is your code.

It will look like this:

s3://your-bucket/HelloWorldFunction/<uuid> .

Would be such result fine for you?

I suppose that there is no any other option according to aws  sam cli documentation

But in the case if you upload several resources to s3 bucket, you can use s3 prefix to put needed code in folder and simply reach it by lambda function name.

Since there will be just one zip inside that folder, you can simply list objects in the folder and get its arn or s3 url, if you need.

 

If such result is ok for you, we will consider your case as the feature request to our pipe.

Regards, Galyna

Chyn January 28, 2021

Ok that help. Thanks ! 

Like Halyna Berezovska likes this
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2021

@Chynok then, I'll update you when we maintain this in future release.

Cheers, Galyna

Vlad Kalinin February 17, 2021

Adding support for --s3-prefix param in the aws-sam-deploy pipe would be great indeed!

Like # people like this
Pieter Vandenburg March 17, 2021

Yes, I've hit a wall because of the `--s3-prefix` issue. I've updated the source locally to support it, would love to send it to Atlassian to get it added.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events