Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

397
Visualizações
AWS - {lambda function} may not have authorization defined

I have encountered this issue when trying to sam deploy my lambda function. I have found a link to the same issue here:

When using guided deploy and accepting the default options I receive a Security Constraints Not Satisfied! error. · Issue #1990 · awslabs/aws-sam-cli

However, even after reading through it and the docs, I do not understand how to fix it. Can somebody explain this to me?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is normally happening for all those who are started with AWS SAM Hello World template and deploy without any changes or following AWS SAM tutorial. (Doesn't mean that you shouldn't start from that template or not use AWS SAM tutorial but you should add some more configurations to get rid of this message).

Here, AWS SAM is informing you that your application configures an API Gateway APIs without authorization. When you deploy the same application, AWS SAM creates a publicly available URL/API.

For getting rid of this message you need to define some access control mechanism for your API.

You can use AWS SAM to control who can access your API Gateway APIs by enabling authorization within your AWS SAM template. example,

MyApi:
   Type: AWS::Serverless::Api
   Properties:
     StageName: Prod
     Auth:
       DefaultAuthorizer: MyLambdaTokenAuthorizer
       Authorizers:
         MyLambdaTokenAuthorizer:
           FunctionArn: !GetAtt MyAuthFunction.Arn
MyAuthFunction:
   Type: AWS::Serverless::Function
   Properties:
     CodeUri: ./src
     Handler: authorizer.handler
     Runtime: nodejs12.x

The above snippet is an example of an authorization mechanism called Lambda Authorizer. There are some other mechanisms too. Like, IAM Permissions, API Keys, etc.

You can find more information about these authorizations from following link https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-controlling-access-to-apis.html

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda