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

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,557,694
Community Members
 
Community Events
184
Community Groups

add Multiple aws account profile

Is there a way to put multiple aws accounts defined in the pipeline . Currently creating a pipeline to deploy aws lambda function to multiple aws accounts as shown below. Already inplaced the corresponding env variables on the repo settings but it still fails. 

 

- step: *build-zip-push
- step:
name: Deploy to DEV
deployment: DEV
script:
- |
export AWS_ACCESS_KEY_ID=$PREPROD_SECRET_KEY
export AWS_SECRET_ACCESS_KEY=$PREPROD_SECRET_KEY
- pipe: atlassian/aws-lambda-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
ERROR:
✖ Failed to update Lambda function code. Error: An error occurred (IncompleteSignatureException) when calling the UpdateFunctionCode operation: Credential must have exactly 5 slash-delimited elements, e.g. keyid/date/region/service/term, got '$PREPROD_SECRET_KEY/20211012/REGION/lambda/aws4_request'

3 answers

Its better not to use AWS_ACCESS_KEY & AWS_SECRET_ACCESS_KEY. Rather use OIDC settings supported by Bitbucket pipeline: https://support.atlassian.com/bitbucket-cloud/docs/deploy-on-aws-using-bitbucket-pipelines-openid-connect/

 

below works for me:

Screen Shot 2022-08-29 at 2.53.25 pm.png

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 22, 2021

@Paul Quincy  Hi. Thanks for your question. Please provide us with full bitbucket-pipelines.yml file to understand your case more clearly.

Regards, Igor.

0 votes
Ajay _view26_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 17, 2021

Hi @Paul Quincy 

 

I use the below pipeline code to update my Lamda 

 

# This is a sample build configuration for Other.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassian/default-image:2

pipelines:
custom:
deploy:
- step:
name: Build and package
script:
- apt-get update && apt-get install -y zip
- zip -r lambda.zip index.js package.json package-lock.json services node_modules
artifacts:
- lambda.zip
- step:
script:
- pipe: atlassian/aws-lambda-deploy:0.5.3
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID # Optional if already defined in the context.
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY # Optional if already defined in the context.
AWS_DEFAULT_REGION: $AWS_REGION # Optional if already defined in the context.
FUNCTION_NAME: $AWS_LAMBDA_FUNCTION_NAME
COMMAND: 'update' # 'alias' or 'update'
# Update variables
ZIP_FILE: 'lambda.zip'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events