SAM v1.20.0 Release: Custom Domains support and Authorization scopes for Amazon Api Gateway, TriggerConfigurations in DeploymentPreference and Tags in IAM Role
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.DomainNameSupport 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 MySNSTopicAuthorizationScopes 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
- writeAdd 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:
- ">="
- 100Support 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: TagValue1Change Log:
- (#1149)(#1170)(#1198)(#1191)(#1199)(#1214)(#1220)(#1233)(#1243)(#1270)(#1247)(#1294)(#1215) Documentation and example updates
- (#1144) Custom domains Api Gateway support
- (#1165) Custom domains route53 support
- (#1195) Add support for TriggerConfigurations in DeploymentConfiguration
- (#1194) Support for function role tag propagation
- (#1228) Add VPC Access Policy when VpcConfig is present
- (#1299) Add sqs and sns policies based on destination config
- (#1231) Add an existing SQS queue option to SNS event
- (#1241) Add new EventBridgeRule SAM Function EventSource
- (#1264) Add
cloudwatch:describeAlarmHistorypolicy, (#1259) Allowkinesis:DescribeStreamSummaryfor KinesisCrudPolicy and KinesisStreamReadPolicy, (#1137) Add AthenaQueryPolicy template, (#1192) Add KMSEncryptPolicy policy template - (#917) Add authorizationscopes
- (#1132) Actually exclude test files from being installed
- (#1230) Add support to point to api gateway distribution
- (#1173) Update DynamoDBCrudPolicy
- (#1200) Fix sns publish
- (#1196) Add intrinsic support for deployment preference enabled
- (#1224) Throw better error for improper api reference
- (#1282) Throw error when method authorizer is present and api auth is not defined
- (#1260) Transform cognito events to a permission with
sourcearn - (#1256) Add Python 3.8 as supported version
- (#1263) Add AppVeyor config to move away from Travis
- (#1222) Update arn format of DynamoDBStreamReadPolicy
- (#1301) Nest securitySchemes under components section in openapi
- (#1316) Remove unsupported options for openapi3.0
- (#1288) Amend provisioned concurrency examples and templates to work for false condition
- (#1318)(#1177) Fix the SAM Slack Community link
- (#1311) Add AssumeRolePolicyDocument to AWS::Serverless::Function
- (#1334) Handle explicit null in SemanticVersion property of AWS::Serverless::Application
- (#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
- (#1319) Update Lambda permission to have the correct case
- (#1321) Add support for Lambda Event Destinations
- (#1322) Adopt black formatting
- (#1340) Add a link to the official AWS docs to the GitHub docs
- (#1235) Redeploy API when function name changes