Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I specify apigateway's role to give permission to invoke a lambda?

I am using AWS apigateway to trigger a lambda function. I deployed them from serverless framework, the configuration looks like:

handler:
  handler: src/index.handler
  name: handler
  tracing: true
  role: updateRole
  events:
    - http:
        path: /contact/{id}
        method: patch
        integration: lambda
        request:
          parameters:
              paths:
                id: true

after deploy, it works perfect. But what I don’t understand is how I can find out where the iam role/policy defined for this API integration?

When open AWS console, it shows me the right configuration in the "Integration Request" tab:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

But I can’t find anywhere it specifies the IAM role to this integration. How can I find it or update it?

enter image description here

>Solution :

Permissions to execute a function from API, are set using resource-based policies for lambda, not IAM role. In lambda console they are listed as:

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading