Pulumi stack on AWS with Python
Following: https://www.pulumi.com/docs/get-started/aws/begin/
From Scratch on a new OS with Homebrew and Python via pyenv:
-
Install
Pulumi
brew install pulumi
-
Create AWS access key for me
aws-vault add me
-
Create AWS access key for ken1
aws-vault add ken1
-
Create quickstart directory
mkdir quickstart && cd quickstart
-
Create new Pulumi stack
pulumi new aws-python
-
Create a new pulumi token to get started, enter it at the prompt
-
Deploy stack
aws-vault exec ken1 -- pulumi up
-
Verify that the bucket is created by logging in with ken1 creds
-
Modify the code to add a bucket object per the doc, apply
-
Get the bucket name from the stack output:
aws-vault exec ken1 -- aws s3 ls $(pulumi stack output bucket_name)
-
Modify the code to set a static website from bucket, apply
-
Use curl to make an HTTP request to the bucket endpoint:
curl $(pulumi stack output bucket_endpoint)
-
Destroyed stack and app history:
aws-vault exec ken1 -- pulumi destroy pulumi stack rm dev
-
git clone repo
-
cd into it
-
Initialize the stack:
pulumi stack init dev