Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OUTPUT = main # Referenced as Handler in template.yaml
OUTPUT = bootstrap # Referenced as Handler in template.yaml
RELEASER = goreleaser
PACKAGED_TEMPLATE = packaged.yaml
STACK_NAME := ssosyncv2
Expand All @@ -16,25 +16,28 @@ test:
go-build:
go build -o $(APP_NAME) main.go

build-SSOSyncFunction:
build-SSOSyncV2Function:
GOOS=linux GOARCH=arm64 go build -o bootstrap main.go
cp ./bootstrap $(ARTIFACTS_DIR)/.

.PHONY: clean
clean:
rm -f $(OUTPUT) $(PACKAGED_TEMPLATE)
rm -rf .aws-sam/

.PHONY: install
install:
go get ./...

main: main.go
goreleaser build --snapshot --rm-dist
# Build for Lambda (ARM64 Linux)
.PHONY: lambda-build
lambda-build:
GOOS=linux GOARCH=arm64 go build -o bootstrap main.go

# compile the code to run in Lambda (local or real)
.PHONY: lambda
lambda:
$(MAKE) main
$(MAKE) lambda-build

.PHONY: build
build: clean lambda
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ Fork of https://github.com/awslabs/ssosync.
### Steps

1. Sign into the zn-master account with your AWS CLI.
2. Run `make package` to build and upload the build artifact.
3. Update the `ssosyncv2` CloudFormation stack in the zn-master account using
the template file `packaged.yaml` on your local machine.
2. Run `make deploy` to build, upload and deploy your latest changes
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Resources:
SSOSyncV2Function:
Type: AWS::Serverless::Function
Properties:
Runtime: provided.al2
Runtime: provided.al2023
Handler: bootstrap
Architectures:
- arm64
Expand Down
Loading