aws / aws/aws-lambda-go

There is no Condition field in the IAMPolicyStatement

Open
#458 0 comments 2 reactions 0 assignees View on GitHub
enhancement type/events
Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
8h 18m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**

The following policy cannot be used with Lambda Custom Authorizer because there is no Condition field in the [IAMPolicyStatement](https://pkg.go.dev/github.com/aws/aws-lambda-go/events#IAMPolicyStatement).

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "execute-api:Invoke",
"Resource": "execute-api:/{{stageNameOrWildcard}}/{{httpVerbOrWildcard}}/{{resourcePathOrWildcard}}",
"Condition" : {
"IpAddress": {
"aws:SourceIp": [ "{{sourceIpOrCIDRBlock}}", "{{sourceIpOrCIDRBlock}}" ]
}
}
}
]
}
```

**Describe the solution you'd like**

Add a Condition field to the IAMPolicyStatement.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.