Step 2: Store your media in Amazon S3
AWS End User Messaging sends MMS media from an Amazon S3 bucket. You store your image, audio, video, or other
media files in Amazon S3, and reference each file by its Amazon S3 URI when you send. The Amazon S3 bucket must
be in the same AWS account and AWS Region as your MMS-capable origination identity, and the
identity that calls send-media-message must have read access to the bucket.
To store MMS media in Amazon S3
-
Create an Amazon S3 bucket in the same AWS Region as your origination identity, using the create-bucket
command: aws s3api create-bucket --regionus-east-1--bucketBucketName -
Upload each media file to the bucket, using the cp command:
aws s3 cpSourceFilePathAndNames3://BucketName/FileName -
Note the Amazon S3 URI of each file. This is the value you pass to the
media-urlsparameter when you send. Each message carries a single media file, so you pass one Amazon S3 URI:s3://BucketName/FileName
Grant the identity that sends MMS read access to the bucket. For example policies, see Identity-based policy examples for Amazon S3 in the Amazon S3 User Guide. For the supported media types and size limits, see the SendMediaMessage API reference.