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 ...

Get Python Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.