Creating an S3 bucket
In order to send a template email to the users, we need to copy our templates to an S3 bucket. We can easily do that through the web, or you can use the AWS CLI that we just installed. The command to create the S3 bucket in the es-west-2
region is something like:
aws s3api create-bucket \ --bucket python-blueprints \ --region eu-west-2 \ --create-bucket-configuration LocationConstraint=eu-west-2
Here we use the command s3api
, which will provide us with different sub-commands to interact with the AWS S3 service. We call the sub-command create-bucket
, which, as the name suggests, will create a new S3 bucket. To this sub-command, we specify three arguments. First, --bucket
, which specifies the S3 bucket's name, then --region
, to specify which region the bucket will be created - in this case, we are going to create the bucket in the eu-west-2
. Lastly, locations outside the region us-east-1
request the setting LocationConstraint
so the bucket can be created in the region...