Skip to content

Commit

Permalink
Use samlocal instead of sam
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Feb 6, 2024
1 parent 6e004ce commit b64da3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cloudformation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: aws-actions/setup-sam@v2
with:
use-installer: true

- uses: unfor19/install-aws-cli-action@v1
with:
version: 2
Expand All @@ -38,6 +34,10 @@ jobs:
echo -e "[default]\naws_access_key_id=test\naws_secret_access_key=test" > "$HOME/.aws/credentials"
echo -e "[default]\nregion=us-east-1\noutput=json\nendpoint_url=http://localhost:4566" > "$HOME/.aws/config"
- name: Setup samlocal
run: |
pip install aws-sam-cli-local
- name: Deploy to LocalStack
env:
AWS_DEFAULT_REGION: "us-east-1"
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ help: ## Show this help

deploy: ## Deploy CloudFormation Template
cd static-web-site-distribution && ./deploy.sh
cd lambda-batch && make deploy
cd lambda-batch && make test-deploy
5 changes: 4 additions & 1 deletion cloudformation/lambda-batch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ build: ## Build binary
GOOS=linux GOARCH=arm64 go build -o $(BINARY_NAME) main.go

deploy: dependency_check build ## Deploy CloudFormation Template
sam deploy --stack-name $(AWS_STACK_NAME) --template-file $(TEMPLATE_FILE) --capabilities CAPABILITY_IAM --resolve-s3 --region ap-northeast-1
sam deploy --stack-name $(AWS_STACK_NAME) --template-file $(TEMPLATE_FILE) --capabilities CAPABILITY_IAM --resolve-s3 --region ap-northeast-1

test-deploy: build ## Deploy CloudFormation Template for test
samlocal deploy --stack-name $(AWS_STACK_NAME) --template-file $(TEMPLATE_FILE) --capabilities CAPABILITY_IAM --resolve-s3 --region ap-northeast-1

0 comments on commit b64da3f

Please sign in to comment.