CodePipeline for Serverless

Has anyone used AWS CodePipeline with a deploy action to deploy a Serverless framework application? Ideally my pipeline would look like:

  • SourceAction -> checks out code from CodeCommit and uploads to S3
  • BuildAction -> downloads from S3, runs “sls package”, uploads lambda zip files and CloudFormation template to S3
  • DeployAction -> updates CloudFormation stack with new lambda functions and template to deploy application

Right now, instead of a CloudFormation DeployAction, I have to use another CodeBuild action to run “serverless deploy --package existingpackage”, but I’m not able to do that cross-accounts.

Hey, man.

Do you solved?