Here is a technical overview of the SMF deployment. Review this overview to get an idea of what the install will do and what resources and skills you need to perform the install.
Most services have "caps" on usage beyond which costs will accrue. In addition, some services are in the free tier only for the first 12 months of usage. Review the AWS pricing pages to understand these pricing models and budget accordingly.
version: 0.2
env:
git-credential-helper: yes
phases:
build:
commands:
# example GitHub refs/heads/F1
- echo $CODEBUILD_WEBHOOK_HEAD_REF
- FeatureBranch="$(basename $CODEBUILD_WEBHOOK_HEAD_REF)"
- stack=$FeatureBranch
# build all Lambda projects (and their dependencies)
- for proj in Lambdas/*/*.csproj; do eval "dotnet build ${proj} --configuration Release"; done
# $stack is replaced by csh
- eval "sam deploy -t Stacks/Test/serverless.template --stack-name $stack --s3-bucket ${S3} --capabilities CAPABILITY_NAMED_IAM --region ${AWS::Region}"
- pwsh -Command "../LzSmfUtil/GetAwsSettings $stack Stacks/Test/AwsSettings.json"
- git config user.name "CodeBuild"
- git config user.email CodeBuild@example.com
- git checkout $FeatureBranch
- git add Stacks/Test/AwsSettings.json
- git commit -m "Update AwsSettings.json for PR Stack"
- git push --set-upstream origin HEAD:$FeatureBranch
version: 0.2
env:
git-credential-helper: yes
phases:
build:
commands:
# ex for GitHub refs/heads/F1
- echo $CODEBUILD_WEBHOOK_HEAD_REF
- FeatureBranch="$(basename $CODEBUILD_WEBHOOK_HEAD_REF)"
- stack=$FeatureBranch
- eval "aws cloudformation delete-stack --stack-name $stack"
- git config user.name "CodeBuild"
- git config user.email CodeBuild@example.com
- git checkout $FeatureBranch
- git rm Stacks/Test/AwsSettings.json
- git commit -m "Deleted AwsSettings.json for PR Stack"
- git push --set-upstream origin HEAD:$FeatureBranch
version: 0.2
env:
git-credential-helper: yes
phases:
build:
commands:
# build all Lambda projects (and their dependencies)
- for proj in Lambdas/*/*.csproj; do eval "dotnet build ${proj} --configuration Release"; done
- eval "sam deploy -t Stacks/Prod/serverless.template --stack-name ${ProdStackNameParam} --s3-bucket ${S3} --capabilities CAPABILITY_NAMED_IAM --region ${AWS::Region}"
- pwsh -Command "../LzSmfUtil/GetAwsSettings $stack Stacks/Prod/AwsSettings.json"
- git config user.name "CodeBuild"
- git config user.email CodeBuild@example.com
- git checkout main
- git add Stacks/Prod/AwsSettings.json
- git commit -m "Update AwsSettings.json for Prod Stack"
- git push --set-upstream origin HEAD:main