Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serverless Framework: Output compiled CloudFormation

I am using the serverless framework for a lambda project. We need to be able to access the cloudformation directly to meet with our standards for other projects. How can I view the full CloudFormation that is compiled from serverless.yml?

like image 478
Drakken Saer Avatar asked Apr 25 '19 15:04

Drakken Saer


People also ask

Do you use CloudFormation in your serverless stack?

And if you do a lot of CloudFormation in your serverless you might like a helper to help put those intrinsic functions directly in your serverless stack without having to escape it weird... Sorry, something went wrong.

What are the optional outputs in CloudFormation?

The optional Outputs section declares output values that you can import into other stacks (to create cross-stack references ), return in response (to describe stack calls), or view on the AWS CloudFormation console. For example, you can output the S3 bucket name for a stack to make the bucket easier to find.

What is output output in AWS CloudFormation?

Outputs. The optional Outputs section declares output values that you can import into other stacks (to create cross-stack references ), return in response (to describe stack calls), or view on the AWS CloudFormation console. For example, you can output the S3 bucket name for a stack to make the bucket easier to find.

What changes do I need to make when using the Serverless Framework?

If you’re using The Serverless Framework there’s some changes that you have to do in the serverless.yml file. Normally, your serverless.yml file looks something like this: Notice the profile:default property — this dictates which user/profile will be used by The Serverless Framework.


1 Answers

Running the package command will generate 2 compiled Cloudformation templates in your service directory, one for stack creation and another for the stack update:

sls package

They'll be available in the folder .serverless as cloudformation-template-create-stack.json and cloudformation-template-update-stack.json, respectively.

like image 162
Daniel Cottone Avatar answered Sep 20 '22 15:09

Daniel Cottone