Skip to content

Feature Request: CI / CD pipelines (sam pipeline init) #1713

@a-h

Description

@a-h

I wish that SAM made it easy to setup a CI /CD deployment pipeline with AWS tools such as a CodeBuild so I don't have to do it myself.

It would be especially useful if it took the tedium out of setting up the cross-account deployments that are commonly used to segregate access to development and test environments from production access.

It would be in the form of a CLI wizard that asks for key information as per the new AWS ECS CLI (https://github.com/aws/amazon-ecs-cli-v2). It has an ecs pipeline init feature which seems to be in the sprit of what I mean (I haven't played around with it much).

  • Set up a CodeBuild job in a build account that builds the master branch when it changes (make build as per the quickstart template, but also make test), packages it up and publishes it to an S3 artifact bucket.
  • Setup CodeDeploy jobs in each environment (e.g. dev, uat, prod) to deploy specific versions of the SAM package from the bucket.
  • Set up a CodePipeline job to be able to deploy the package across environments. Ideally, the first environment would be automated, with subsequent environments needing to be triggered manually, or manually approved.

Proposal

  • Add a sam pipeline init command that starts a wizard to create the required CloudFormation templates.
  • Add a sam pipeline deploy command that deploys the various CodeBuild, CodeDeploy and CodePipeline things.

It shouldn't mean any differences to the SAM specification, just improved developer experience.

Additional Details

Perhaps this subcommand could be written in Go as per the new ECS CLI to reuse some of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions