We are new to the Bitbucket CI/CD pipleline creations and AWS deployments.
We are trying to build and deploy/publish a .Net core (3.1) API to AWS Lambda as Serverless Application Model using Bitbucket pipeline. We have come across the below link to deploy to AWS.
We were able to achieve project build and test but the AWS Lambda SAM deployment is not working correctly. Please find our below yaml file
image: mcr.microsoft.com/dotnet/core/sdk:3.1
pipelines:
default:
- step:
caches:
- dotnetcore
script: # Modify the commands below to build your repository.
- export PROJECT_NAME=MyProject
- export TEST_NAME=MyProject.Tests
- dotnet restore
- dotnet build $PROJECT_NAME
- dotnet test $TEST_NAME
- step:
name: deploy AWS SAM
script:
- pipe: atlassian/aws-sam-deploy:0.3.4
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.
COMMAND: 'deploy'
I think, we are missing few steps in the "deploy AWS SAM" but not sure how to provide the published libraries path or any other steps. We are not using any docker in our project.
Can someone help?