skip to Main Content

In API Gateway, Im having some issues getting "Aws Services" to show as an option in Integration Type when creating a method within a proxy resource. I can see that this is showing up for normal resource when I don’t select the "proxy" checkbox, but if I check that box, and create a get method within the proxy resource, then I don’t see that option.

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Here is how I got it working with proxy resource (NOTE: Im using TF for the IaC): enter image description here

    Then for the policy and role:

    resource "aws_iam_policy" "s3_policy" {
      name        = "s3-policy"
      description = "Policy for allowing all S3 Actions"
    
      policy = <<EOF
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::${local.bucket_name}-root/*"
            }
        ]
    }
    EOF
    }
    
    
    resource "aws_iam_role" "s3_api_gateyway_role" {
      name = "s3-api-gateyway-role"
    
    
      assume_role_policy = <<EOF
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "",
          "Effect": "Allow",
          "Principal": {
            "Service": "apigateway.amazonaws.com"
          },
          "Action": "sts:AssumeRole"
        }
      ]
    }
      EOF
    }
    
    resource "aws_iam_role_policy_attachment" "s3_policy_attach" {
      role       = aws_iam_role.s3_api_gateyway_role.name
      policy_arn = aws_iam_policy.s3_policy.arn
    }
    

  2. Proxy resources only support HTTP or Lambda integrations.

    Here is how you can do this without using a proxy resource: https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-proxy-integrate-service/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search