Skip to content

SAM v1.20.0 Release: Custom Domains support and Authorization scopes for Amazon Api Gateway, TriggerConfigurations in DeploymentPreference and Tags in IAM Role

Choose a tag to compare

@praneetap praneetap released this 13 Jan 23:12
· 126 commits to master since this release
7f3816e

SAM v1.20.0 Release: Custom Domains support and Authorization scopes for Amazon Api Gateway, TriggerConfigurations in DeploymentPreference and Tags in IAM Role

Community Contributors to this Release

@53ningen, @alexfrosa, @brettstack, @cakepietoast, @chrisoverzero, @dballance, @ebaizel, @eddiecho, @eugeniosu, @gliptak, @hui-yang, @klmz, @koenaad, @kvasukib, @limitusus, @MattMasters, @me2resh, @merzwilliam, @michaeljfazio, @nheijmans, @nikp, @pfeilbr, @tde908, @timoschilling, @yan12125, @zmaleki

Support Custom domains for Amazon Api Gateway

This release adds support for configuring custom domains on AWS::Serverless::Api. For more information about this feature see CloudFormation documentation. (#1144) (#1165)

Resources:
  MyApi:
    Type: AWS::Serverless::Api
    Properties:
      OpenApiVersion: 3.0.1
      StageName: Prod
      Domain:
        DomainName: !Ref DomainName
        CertificateArn: !Ref ACMCertificateArn
        EndpointConfiguration: EDGE
        BasePath:
          - /fetch
        Route53:
         HostedZoneId: ZQ1UAL4EFZVME
         IpV6: true
         DistributionDomainName: !GetAtt Distribution.DomainName

Support for TriggerConfigurations in DeploymentPreference

This release adds support for adding Trigger Configurations on DeploymentPreference of a serverless function. For more information on Trigger Configurations see CloudFormation documentation. A big thank you to @cakepietoast for contributing this feature! (#1195)

Resources:
  MinimalFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: .
      Handler: hello.handler
      Runtime: python3.7
      AutoPublishAlias: live
      DeploymentPreference:
        Enabled: true
        Type: Linear10PercentEvery1Minute
        TriggerConfigurations:
          - TriggerEvents:
              - DeploymentSuccess
              - DeploymentFailure
            TriggerName: TestTrigger
            TriggerTargetArn: !Ref MySNSTopic

AuthorizationScopes for Amazon Api Gateway

This release supports AuthorizationScopes for Authorizers in AWS::Serverless::Api. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. For more information on scopes see AWS blog post. A big thank you to @klmz for contributing this feature! (#917)

Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: .
      Handler: index.handler
      Runtime: python3.7
      Events:
        CognitoDefaultScopesWithOverwritten:
          Type: Api
          Properties:
            RestApiId: !Ref MyApiWithCognitoAuth
            Method: get
            Path: /hello
            Auth:
              Authorizer: MyDefaultCognitoAuth
              AuthorizationScopes: 
                - read
                - write

Add an existing SQS queue for SNS event

SqsSubscription property of the SNS event type now supports adding an existing SQS queue. When this property is set, uses an existing SQS queue or creates a SQS queue and subscribes to the SNS topic, and the Lambda function is subscribed to the SQS queue. For more information about SNS and SQS, see the developer documentation. A big thank you to @53ningen for contributing this feature! (#1231)

Resources:
  MyLambdaFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs10.x
      CodeUri: .
      MemorySize: 128

      Events:
        SQSSubscriptionEvent:
          Type: SNS
          Properties:
            Topic: !Ref MySnsTopic
            SqsSubscription:
              QueueUrl: !Ref MyQueue
              QueueArn: !GetAtt MyQueue.Arn
              QueuePolicyLogicalId: NotificationA
              BatchSize: 8
              Enabled: true
            FilterPolicy:
              store:
                - example_corp
              price_usd:
                - numeric:
                    - ">="
                    - 100

Support Tags for IAM Role

This release adds support to propogate Serverless function tags to IAM roles generated for the function. You can configure tags on IAM Role by updating the Tags property of Serverless function. A big thank you to @cakepietoast for contributing this feature! (#1194)

Resources:
  MyFunctionWithTags:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: .
      Handler: index.handler
      Runtime: nodejs10.x
      Tags:
        TagKey1: TagValue1

Change Log:

  1. (#1149)(#1170)(#1198)(#1191)(#1199)(#1214)(#1220)(#1233)(#1243)(#1270)(#1247)(#1294)(#1215) Documentation and example updates
  2. (#1144) Custom domains Api Gateway support
  3. (#1165) Custom domains route53 support
  4. (#1195) Add support for TriggerConfigurations in DeploymentConfiguration
  5. (#1194) Support for function role tag propagation
  6. (#1228) Add VPC Access Policy when VpcConfig is present
  7. (#1299) Add sqs and sns policies based on destination config
  8. (#1231) Add an existing SQS queue option to SNS event
  9. (#1241) Add new EventBridgeRule SAM Function EventSource
  10. (#1264) Add cloudwatch:describeAlarmHistory policy, (#1259) Allow kinesis:DescribeStreamSummary for KinesisCrudPolicy and KinesisStreamReadPolicy, (#1137) Add AthenaQueryPolicy template, (#1192) Add KMSEncryptPolicy policy template
  11. (#917) Add authorizationscopes
  12. (#1132) Actually exclude test files from being installed
  13. (#1230) Add support to point to api gateway distribution
  14. (#1173) Update DynamoDBCrudPolicy
  15. (#1200) Fix sns publish
  16. (#1196) Add intrinsic support for deployment preference enabled
  17. (#1224) Throw better error for improper api reference
  18. (#1282) Throw error when method authorizer is present and api auth is not defined
  19. (#1260) Transform cognito events to a permission with sourcearn
  20. (#1256) Add Python 3.8 as supported version
  21. (#1263) Add AppVeyor config to move away from Travis
  22. (#1222) Update arn format of DynamoDBStreamReadPolicy
  23. (#1301) Nest securitySchemes under components section in openapi
  24. (#1316) Remove unsupported options for openapi3.0
  25. (#1288) Amend provisioned concurrency examples and templates to work for false condition
  26. (#1318)(#1177) Fix the SAM Slack Community link
  27. (#1311) Add AssumeRolePolicyDocument to AWS::Serverless::Function
  28. (#1334) Handle explicit null in SemanticVersion property of AWS::Serverless::Application
  29. (#1341) Remove example applications for the Serverless Application Repository. These have been added to a new repository: https://github.com/aws-samples/serverless-app-examples
  30. (#1319) Update Lambda permission to have the correct case
  31. (#1321) Add support for Lambda Event Destinations
  32. (#1322) Adopt black formatting
  33. (#1340) Add a link to the official AWS docs to the GitHub docs
  34. (#1235) Redeploy API when function name changes