To create the gateway endpoint, configure the following settings:
For Region, select the Region code for where you want to create your endpoint. For example, to create an endpoint in us-east-1, select com.amazonaws.us-east-1.s3.
For VPC, select the VPC ID for your instance.
For Configure route tables, select the route table ID for your instance.
For Policy, choose Full Access to allow full access to Amazon S3. If you choose Custom, then you must allow the s3:GetObject API call on the Amazon Linux repositories buckets.
Note: In the following example policies, replace us-east-1 with your endpoint Region.
AL2023:
{ "Statement": [
{
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::al2023-repos-us-east-1-de612dc2/*"
]
}
]
}
AL2:
{ "Statement": [
{
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::amazonlinux.us-east-1.amazonaws.com/*",
"arn:aws:s3:::amazonlinux-2-repos-us-east-1/*"
]
}
]
}
AL1:
{ "Statement": [
{
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::packages.us-east-1.amazonaws.com/*",
"arn:aws:s3:::repo.us-east-1.amazonaws.com/*"
]
}
]
}
Note: In the preceding AL1 and AL2 policies, the arn:aws:s3:::amazonlinux.us-east-1.amazonaws.com/* and arn:aws:s3:::amazonlinux-2-repos-us-east-1/* buckets host the repositories.