Skip to content

Conversation

sanathkr
Copy link
Contributor

No description provided.

Copy link

@roryj roryj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is super helpful to have, and like what you have written. Some minor comments. I wonder if there is a way to relate the weird AWS parts (things with templates and changesets) in an easier to understand way

HOWTO.md Outdated
...
```

## Packing Artifacts (Automated)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think switching the order around so automatic would make more sense. That way people who are just taking a look get the easier version first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. The Manual step felt redundant so I merged both of them together


To use this command, set `CodeUri` property to be the path to your
source code folder/zip/jar and `DefinitionUri` property to be a path to
your OpenAPI file, as shown in the example below
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By OpenAPI do you mean swagger file? Is that the official name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's the new official name

Run the following command to upload your artifacts to S3 and output a
packaged template that can be readily deployed to CloudFormation.
```
aws cloudformation package \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your examples above are using yaml, but your command for package uses json :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. fixed

```


## Deploying to AWS CloudFormation
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the understanding of a changeset could be confusing for new users. Maybe have a brief description of what a changeset is and how cloudformation uses it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

HOWTO.md Outdated
aws cloudformation deploy \
--template-file /path_to_template/packaged-template.json \
--stack-name my-new-stack \
--parameter-overrides Key1=Value1 Key2=Value2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these commands do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a description of the command

@sanathkr
Copy link
Contributor Author

@roryj Addressed your comments

HOWTO.md Outdated
--template-file /path_to_template/packaged-template.json \
--stack-name my-new-stack \
--parameter-overrides Key1=Value1 Key2=Value2
--stack-name my-new-stack
Copy link

@jamesbyars jamesbyars Dec 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're missing a \ at the end of this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. fixed

@sanathkr sanathkr requested a review from vikrambhatt January 3, 2017 20:18
## Deploying to AWS CloudFormation
SAM template is deployed to AWS CloudFormation by [creating a changeset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets-create.html)
using the SAM template followed by [executing the changeset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets-execute.html).
Think of a ChangeSet as a diff between your current stack template and the new template that you are deploying. After you create a ChangeSet, you have the opportunity to examine the diff before executing it. Both the AWS Console and AWS CLI provide commands to create and execute a changeset.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is really helpful, and will make it clear what this does. 👍

@@ -0,0 +1,73 @@
# How to create serverless applications using AWS SAM
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is the place to discuss what a stack is? I noticed we discussed it below, but didnt quite define what it is. I like your below definition of what a changeset is, but maybe a simple definition of a stack here would be helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done

@sanathkr
Copy link
Contributor Author

sanathkr commented Jan 6, 2017

Uploaded a new commit with an introduction to CloudFormation stacks

Copy link

@vikrambhatt vikrambhatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad that you are adding this 👍 .

HOWTO.md Outdated
using the SAM template followed by [executing the changeset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets-execute.html).
Think of a ChangeSet as a diff between your current stack template and the new template that you are deploying. After you create a ChangeSet, you have the opportunity to examine the diff before executing it. Both the AWS Console and AWS CLI provide commands to create and execute a changeset.

Alternatively, you can use `aws cloudformation deploy` CLI command deploy the SAM template. Under-the-hood it creates and executes a changeset and waits until the deployment completes. It also print debugging hints when the deployment fails. Run the following command to deploy the packaged template to a stack called `my-new-stack`:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLI command to deploy ...
If also prints debugging ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will change

## Deploying to AWS CloudFormation
SAM template is deployed to AWS CloudFormation by [creating a changeset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets-create.html)
using the SAM template followed by [executing the changeset](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets-execute.html).
Think of a ChangeSet as a diff between your current stack template and the new template that you are deploying. After you create a ChangeSet, you have the opportunity to examine the diff before executing it. Both the AWS Console and AWS CLI provide commands to create and execute a changeset.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is more of a cloudformation detail, but it might be worth mentioning that once a changeset is executed, other unused ones will be discarded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is relevant to this audience. I'd rather not confuse them

HOWTO.md Outdated
aws cloudformation package \
--template-file /path_to_template/template.yaml \
--s3-bucket bucket-name \
--output-template-file packaged-template.json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wont the output be yaml too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it will be. Will change

Copy link

@vikrambhatt vikrambhatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sanathkr sanathkr merged commit 33194de into master Jan 11, 2017
@sanathkr sanathkr deleted the howto_guide branch April 3, 2018 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants