aws-amplify / aws-amplify/amplify-cli
Geo: include `aws:Referer` `Condition` in generated IAM policy
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Is this related to a new or existing framework?
Web Components
### Is this related to a new or existing API?
New API
### Is this related to another service?
Geo
### Describe the feature you'd like to request
Including an [`aws:Referer` `Condition`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-referer) in the generated IAM policy using customer input will help customers control their costs by limiting usage of provisioned maps to web sites that they control.
### Describe the solution you'd like
Sample generated IAM policy:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RestrictedMapReadOnly",
"Effect": "Allow",
"Action": "geo:GetMap*",
"Resource": "*",
"Condition": {
"StringLike": {
"aws:Referer": [
"https://example.com/*",
"https://www.example.com/*"
]
}
}
}
]
}
```
Values for the condition would come from the interactive UI.
### Describe alternatives you've considered
n/a
### Additional context
https://stackoverflow.com/questions/68964563/amazon-location-service-authentication/68992509#68992509
### Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change
Contributor guide
Assessment
This issue has not been assessed yet.