Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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'

2 answers

0 votes

@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 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
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

184 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you