Skip to content
No description, website, or topics provided.
Go Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
cloudformation
cmd
internal
pulumi
.gitignore
LICENSE
README.md
go.mod
go.sum
types.go

README.md

Shipment

A shipping service, because what is a shop without a way to ship your purchases?

The Shipping service is part of the ACME Fitness Serverless Shop. The goal of this specific service is, as the name implies, to ship products using a wide variety of shipping suppliers.

Prerequisites

Deploying

With Pulumi (using SQS for eventing)

To deploy the Shipment Service you'll need a Pulumi account. Once you have your Pulumi account and configured the Pulumi CLI, you can initialize a new stack using the Pulumi templates in the pulumi folder.

cd pulumi
pulumi stack init <your pulumi org>/acmeserverless-shipment/dev

Pulumi is configured using a file called Pulumi.dev.yaml. A sample configuration is available in the Pulumi directory. You can rename Pulumi.dev.yaml.sample to Pulumi.dev.yaml and update the variables accordingly. Alternatively, you can change variables directly in the main.go file in the pulumi directory. The configuration contains:

config:
  aws:region: us-west-2 ## The region you want to deploy to
  awsconfig:generic:
    sentrydsn: ## The DSN to connect to Sentry
    accountid: ## Your AWS Account ID
    wavefronturl: ## The URL of your Wavefront instance
    wavefronttoken: ## Your Wavefront API token
  awsconfig:tags:
    author: retgits ## The author, you...
    feature: acmeserverless
    team: vcs ## The team you're on
    version: 0.1.0 ## The version

To create the Pulumi stack, and create the Payment service, run pulumi up.

If you want to keep track of the resources in Pulumi, you can add tags to your stack as well.

pulumi stack tag set app:name acmeserverless
pulumi stack tag set app:feature acmeserverless-shipment
pulumi stack tag set app:domain shipment

With CloudFormation (using EventBridge for eventing)

Clone this repository

git clone https://github.com/retgits/acme-serverless-shipment
cd acme-serverless-shipment

Get the Go Module dependencies

go get ./...

Change directories to the cloudformation folder

cd ./cloudformation

If your event bus is not called acmeserverless, update the name of the feature parameter in the template.yaml file. Now you can build and deploy the Lambda function:

make build
make deploy

Testing

To test, you can use the SQS or EventBridge test apps in the acme-serverless repo.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

See the LICENSE file in the repository

You can’t perform that action at this time.