Giter VIP home page Giter VIP logo

cfn101-workshop's Introduction

AWS CloudFormation - Workshop
Website GitHub Workflow Status

This repository provides all the resources referenced in the CloudFormation workshop as well as the code used to build it.

Usage

  1. Clone the repository to your working directory or Download the ZIP file from GitHub.
  2. Open the downloaded files in your code editor or IDE of your choice.

The working directory is located in code/workspace where you can follow along and write your code to.

In the code/solutions, you can find the completed solution for each lab. This can be used as a reference, in case you get stuck or things don't work as intended.

Local development

To set-up a local development environment for changing the workshop, please follow the instructions in local development file.

Contributing

Contributions are more than welcome. Please read the code of conduct and the contributing guidelines.

License

This library is licensed under the MIT-0 License. See the license file.

cfn101-workshop's People

Contributors

abhinav777 avatar alfredocambera avatar aliabas7 avatar asifkazi avatar avinashseelam9 avatar cjhar avatar cmick-aws avatar coderade avatar connorkirk avatar ctd avatar dkovvuri avatar dreddy-aws avatar jamesoff avatar jennapederson avatar jlosito avatar kripa-dixit avatar kumarev avatar matteofigus avatar mrinaudo-aws avatar pranjal-gururani avatar rambhiya-amzn avatar ravsau avatar rezabekf avatar robert-hanuschke avatar satyamgptaws avatar shubham-amaz avatar snjkumar23 avatar stilvoid avatar svozza avatar ttymt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfn101-workshop's Issues

The `aws lambda invoke` command does not complete as written on Windows cmd or PowerShell

The following command does not complete as written on Windows (cmd or PowerShell):

aws lambda invoke --function-name cfn-workshop-python-function --payload '{"time_zone": "Europe/London"}' --cli-binary-format raw-in-base64-out response.json

In cmd, the output is:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: response.json

In PowerShell, the output is:

An error occurred (InvalidRequestContentException) when calling the Invoke operation: Could not parse request body into json: Could not parse payload into json: Unexpected character ('t' (code 116)): was expecting double-quote to start field name
 at [Source: (byte[])"{time_zone: Europe/London}"; line: 1, column: 3]

The PowerShell version is fixed by simply adding a backslash to escape each double-quote. I'm not sure off the top of my head about the cmd version.

Inconsistent content rendering on `workshop.aws`

There is an inconsistent content rendering on workshops.aws, this is very likely due to a Hugo used by AWS Amplify not being the latest version. Please see below example from customer:


Hello Franco.

It seems that it works in the .sa.engineering domain but not in the workshop.aws. An example:

Regards,
Pablo

Originally posted by @pablogarciaarevalo in #98 (comment)

`brew` is only for macs

Re the first bit of the README:

Although brew is available for linux, hardly anyone uses it. Brew doesn't exist at all for Windows.

pip not listed as prerequisite

pip is not listed as a prerequisite. Although it is addressed in the section for installing a linter (under the "install a code editor" section) it is not marked as a hard requirement. It's impossible to complete the lab without it, however, as you cannot bundle the lambda without it.

Since the linter is hidden away under "install a code editor" (which in turn is likely to be skipped over, since many people already have one) and additionally marked as "recommended" in any case, Python/pip should be promoted to a top-level prerequisite with install instructions for the major platforms.

Prequisites/AWS User - Do we need Admin Access?

The current pre-requisite page gives instructions to create a user with Admin access.
Do we need it? I think Power User would be acceptable, given we're not creating IAM resources in the existing content.

Alternatively, I think we should add a justification explaining:

  1. Why it is needed
  2. A disclaimer about granting random things admin access

This is a really useful feature provided by Parameter Store. I had not come across it before.

This is a really useful feature provided by Parameter Store. I had not come across it before.
I imagine many of the users will also not have seen this feature before. Perhaps it is worth explaining it in more depth? It took me some further reading to understand what was going on.

I think it would add value to explain:

  • What is parameter store

  • Public Parameters maintained by AWS

    • The different public parameters available (AMI, Regions, Endpoints etc)

Originally posted by @ConnorKirk in #26

many of images are not showing up correctly

almost all of the images in the middle of sentence are not showing up.
I guess the link has broken or source image has gone.

For instance,
AWS CFN 101 Workshop > Prerequisites > Create an AWS Account,
in the middle of sentence there is a blue string "new-user-1-png" without image.

CFN submit error

Following the last "Example in python" in the advanced section, when doing cfn generate && cfn submit --set-default --region us-east-1

I get the following:

Explicitly specify value for tagging
Resource schema is valid.
Generated files for AWSSamples::EC2::ImportKeyPair
Explicitly specify value for tagging
Resource schema is valid.
Starting Docker build. This may take several minutes if the image 'lambci/lambda:build-python3.7' needs to be pulled first.
=== Unhandled exception ===
Please report this issue to the team.
Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues
Please include the log file 'rpdk.log'

rpdk.log

Improve instructions for running locally

From the README:

cd workshop
hugo server
open http://localhost:1313/
  1. open isn't portable. Not commonly available in linux. Definitely not available in windows.
  2. hugo server is blocking so you can't just type it and then type the next line.

Lab09 Missing - on resource options

In the instructions for lab09, there is a missing "-" on the resource option in the EC2 user data.

Path: https://github.com/aws-samples/cfn101-workshop/blob/ed9b72b70568e020796f1d72c07d1388683ea4e3/workshop/content/30-workshop-part-01/30-launching-ec2/400-lab-09-helper-scripts.md#4-configure-cfn-signal-and-creationpolicy-attribute
Section 4.2

Current:

# Call cfn-signal script to send a signal with exit code 
/opt/aws/bin/cfn-signal --exit-code $? --stack ${AWS::StackName} -resource WebServerInstance --region ${AWS::Region}

Should be:

# Call cfn-signal script to send a signal with exit code 
/opt/aws/bin/cfn-signal --exit-code $? --stack ${AWS::StackName} --resource WebServerInstance --region ${AWS::Region}

It is ok in the corresponding yaml solution file

avoid error when aws lambda invoked

In lab 12, when check if lambda works properly, Invalid base 64 error happened. So to avoid it, needed to add one more argument in aws cli.

aws lambda invoke \
--function-name cfn-workshop-python-function \
--payload '{"time_zone":"Europe/London"}' \
--cli-binary-format raw-in-base64-out \
response.json

Anyway, Thank you so much for good hands-on lab!

Correct flags used with cfn-signal

In Lab 09: Helper Scripts, step 4.2, the wrong flags are used with the cfn-signal script:

# Call cfn-signal script to send a signal with exit code /opt/aws/bin/cfn-signal --exit-code $? -s ${AWS::StackName} -r WebServerInstance --region ${AWS::Region}

The Documentation states that the -s flag is short for --success, not --stack, and the -r flag is short for --reason, not --resource. The correct flags are used in the solution template provided as follows:

# Call cfn-signal script to send a signal with exit code /opt/aws/bin/cfn-signal --exit-code $? --stack ${AWS::StackName} --resource WebServerInstance --region ${AWS::Region}

The lab code needs to be corrected.

LAB 10: NESTED STACKS

In section 4.1 - Prepare IAM role template, should it say AmazonSSMManagedInstanceCore policy allows ec2 instance to access Session Manager instead of other way around allowing ssm to access ec2?

Broken Link Linting and testing

Describe the bug

There are a couple of broken links in the workshop under the Linting and testing section.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the template testing section under the Linting and testing page
  2. Click on the links "general", "projects", and "tests"
  3. See that they go to a 404

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Screenshot 2023-12-04 at 13 05 31

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Version: 119.0.6045.199

Additional Context
I believe each of the links should be going to this link now.
https://aws-ia.github.io/taskcat/docs/schema/taskcat_schema/

Ordering of content

Pre-requisites should come before Lab Resources. Currently the Lab Resources page requires use of git but at that point we haven't asked the user to install it.

Update cfn-flip to rain

Is your feature request related to a problem? Please describe.
In the flipping formats and cleanup section of the workshop, it recommends using the cfn-flip tool. The cfn-flip tool is deprecated in favor of the rain tool.
https://catalog.workshops.aws/cfn101/en-US/basics/templates/flipping-formats-and-cleanup

Describe the solution you'd like
I would like the workshop to be updated so that I'm not using a deprecated tool. Instead I would like to perform the JSON to YAML conversion using a supported tool.

The new command would be rain fmt.

Some code blocks are not being displayed properly

On the workshop website there appears to be numerous bits of content that should be rendered as a code block, but are instead being rendered as a paragraph.

Example: Step 2 under Fn::Ref of https://cfn101.sa.engineering/30-workshop-part-01/20-cloudformation-features/200-lab-03-functions/

I fixed this in the first instance I came across in #91 but it seems to occur throughout the workshop.

Furthermore I've observed:

  • The blocks are shown correctly when using hugo serve on my own machine
  • The blocks are shown correctly through GitHub's Markdown rendering

I'm not sure what the cause is but I suspect so far that it's perhaps a difference in behaviour between the version of hugo I'm using, and what's building the published site.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.