-
Notifications
You must be signed in to change notification settings - Fork 57
2.3
Paul Duvall edited this page Mar 6, 2020
·
7 revisions
Review and ensure that you have setup your development environment before going through the steps below.
- buildspec.yml - Build specification that runs from an AWS CodeBuild action in AWS CodePipeline.
- ccoa-2-cfn-nag-pipeline.yml - CloudFormation template that provisions AWS CodePipeline and associated resources to run the cfn_nag security static analysis tool as part of the deployment pipeline.
- volume-encrypted.yml - CloudFormation template that provisions an encrypted EBS Volume.
- volume.yml - CloudFormation template that provisions an unencrypted EBS Volume.
- From AWS Cloud9, type the following:
cd ~/environment/ccoa/
- Create a new file.
touch ccoa-2-cfn-nag-pipeline.yml
- Copy the source contents from the ccoa-2-cfn-nag-pipeline.yml file and save it to your local file in your Cloud9 environment called ccoa-2-cfn-nag-pipeline.yml. This CloudFormation template provisions a deployment pipeline that runs preventive checks via cfn_nag.
From your Cloud9 terminal, type the following (replacing you@example.com):
aws cloudformation create-stack --stack-name ccoa-2-cfn-nag-pipeline --template-body file:///home/ec2-user/environment/ccoa/ccoa-2-cfn-nag-pipeline.yml --parameters ParameterKey=EmailAddress,ParameterValue=you@example.com --capabilities CAPABILITY_NAMED_IAM --disable-rollback
From your Cloud9 terminal, type the following:
aws cloudformation describe-stacks --stack-name ccoa-2-cfn-nag-pipeline
View the CodeCommit repo
- Go to the CloudFormation console to see the stack being launched.
- Once the CloudFormation stack is successful, select the checkbox next to the stack and click the Outputs tab.
- From Outputs, click on the PipelineUrl output to open the pipeline in AWS CodePipeline
- Go to the CodeCommit repo.
- Open
buildspec.ymland change fromvolume.ymltovolume-encrypted.ymland commit the changes. - Go back to the pipeline you created and watch the change.
Go to Cleanup to remove any resources you created in this sublesson.