Amazon EC2 to Amazon S3 Express One Zone directory bucket

Amazon EC2 → Amazon S3 Express One Zone

SAM Template that creates an EC2 Instance, an Amazon S3 Express One Zone directory bucket, and required IAM Role to access the bucket from the instance.

S3 Express One Zone is the first S3 storage class that gives you the option to co-locate high-performance object storage and AWS compute resources, such as Amazon Elastic Compute Cloud, Amazon Elastic Kubernetes Service, and Amazon Elastic Container Service, within a single Availability Zone.
This pattern provisions both the Amazon EC2 instance and the S3 Express One Zone Directory bucket within same Availability Zone. It performs read and write opertations from the directory bucket from within the EC2 instance and outside.
Access to the directory bucket from the EC2 instance is provided through IAM Role associated with the instance profile.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/ec2-s3-express-one-zone-sam

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the Amazon S3 bucket content: aws s3 rm s3://{BucketExpressOneZoneName} --recursive --region {my-region}
Delete the stack: sam delete.

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn