Created
January 14, 2021 15:39
-
-
Save leantorres73/21b3eca501b2f993b50f8e4f8561bf45 to your computer and use it in GitHub Desktop.
api policy receiver lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const roleapigatewaysocketapi = new iam.Role(this, "roleapigatewaysocketapi", { | |
assumedBy: new iam.ServicePrincipal("apigateway.amazonaws.com") | |
}); | |
// access role for the socket api to access the socket lambda | |
const policy = new iam.PolicyStatement({ | |
effect: iam.Effect.ALLOW, | |
resources: [lambdaAPIsocket.functionArn], | |
actions: ["lambda:InvokeFunction"] | |
}); | |
roleapigatewaysocketapi.addToPolicy(policy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment