-
Make sure you have your own AWS account. If not sign up here
-
Download the
cft_dev_test_logoexecutive.yml
file from here -
Run the commands given below in git bash to generate public and private RSA keys for cloudformation template.
openssl genrsa -out private_key.pem 2048 openssl rsa -pubout -in private_key.pem -out public_key.pem
-
The RSA private key in
private_key.pem
can be used forCLOUD_FRONT_PRIVATE_KEY
in the environmental variables. -
Visit AWS CloudFormation service.
-
Click on the
Create Stack
button. -
On the Create Stack page, select
Upload a template file
. -
Choose the
cft_dev_test_logoexecutive.yml
file you downloaded earlier, and click onNext
.
- Provide a
Stack Name
. - Inside
CDNPathInS3
, typeassets
. You can also choose other folder names where you want to keep the images. - Inside
EncodedRSAPublicKey
, paste the public key generated earlier. - Click on
Next
.
- On the
Review
page, check the checkbox inside theCapabilities
section. - Click on
Submit
. You stack will start creating resources now. - Wait until the stack creation status becomes
CREATE_COMPLETE
. - Now go to the
Output
section of the stack, and you can findBUCKET_NAME, BUCKET_REGION, KEY, DISTRIBUTION_DOMAIN and CLOUD_FRONT_KEYPAIR_ID
of the environmental variables seperated by comma(,). - Go to the
Resources
section of the stack, and click on theIAMUser
created. This will redirect you to the IAM console of the user created. Under theSecurity credentials
section scroll toKeys
and clickCreate access key
. - Select
Other
underAccess key best practices & alternatives
, and clickNext
. - Provide
Description tag value
and clickCreate access key
. Now you have got two more environmental values forACCESS_KEY
andSECRET_ACCESS_KEY
.