Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions events/appsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ type AppSyncResolverTemplate struct {

// AppSyncIAMIdentity contains information about the caller authed via IAM.
type AppSyncIAMIdentity struct {
AccountID string `json:"accountId"`
CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
CognitoIdentityID string `json:"cognitoIdentityId"`
SourceIP []string `json:"sourceIp"`
Username string `json:"username"`
UserARN string `json:"userArn"`
AccountID string `json:"accountId"`
CognitoIdentityAuthProvider string `json:"cognitoIdentityAuthProvider"`
CognitoIdentityAuthType string `json:"cognitoIdentityAuthType"`
CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
CognitoIdentityID string `json:"cognitoIdentityId"`
SourceIP []string `json:"sourceIp"`
Username string `json:"username"`
UserARN string `json:"userArn"`
}

// AppSyncCognitoIdentity contains information about the caller authed via Cognito.
Expand Down
2 changes: 2 additions & 0 deletions events/testdata/appsync-identity-iam.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"accountId": "accountid123",
"cognitoIdentityPoolId": "identitypoolid123",
"cognitoIdentityId": "identityid123",
"cognitoIdentityAuthType": "authenticated",
"cognitoIdentityAuthProvider": "providerABC",
"sourceIp": ["192.168.196.186", "193.168.196.186"],
"username": "user1",
"userArn": "arn:aws:iam::123456789012:user/appsync"
Expand Down