Skip to content

Commit

Permalink
fix: prevent IndexError with integration URIs without .Arn (#1901)
Browse files Browse the repository at this point in the history
* Use fnGetAtt instead of ref

* Return gracefully

* chore: update develop with latest release branch (#1822)

* chore: bump version 1.30.0 (#1792)

* Fix conflicts release 1 30 (#1804)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Release/v1.28.0 (#1754) (#1756)

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* bump sam-translator version to v1.28.0

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* bump version to 1.28.1 (#1758) (#1759)

* Fix merge conflict in release 1.29.0 (#1771)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* Feature toggle (#1737)

* Adding logic to pipe app config providers. Unit test pending

* Adding some documentation to config providers.

* Adding some unit tests and making black ignore json files.

* minor cleanup.

* Addressing PR comments.

* feature: Support MTLS auth properties in REST and HTTP API domain names (#1725)

* feature: Support MTLS auth properties in REST and HTTP API domain names

* fix unicode != str issue in py2.7

* add SecurityPolicy because default RESTAPI is using TLS1.0

* Add new property DisableExecuteApiEndpoint

* black reformat

* Address comments

* Add tests on invalid templates

* address test failures in py2.7

* restart travis tests

* fix: adding support for passing target id to EventBridgeRule (#1747)

* Manage black version using requirement file (#1748)

* chore: Manage black version in dev.txt

- config pre-commit
- config development guide
- config travis

Refer to the commit below in aws-sam-cli
https://github.com/aws/aws-sam-cli/commit/d725db5fbfc698a9f0c7582

* Format using black 20.8b1

* Opt-out black fron dev.txt for Python 2

* Release/v1.29.0 (#1769)

* Mq event source (#60)

* Support AmazonMQ as event source

* Set black hook language version to python3

* chore: version bump (#64)

* Black reformat

Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

* fix: Validate API request models (#1757)

* chore: Upgrade outdated dependencies in base.txt and dev.txt (#1744)

* chore: Update versions in in base.txt (no effective difference)

* chore: Update versions specified with ">=" in dev.txt

* Fallback pytest to 4.6.x for python2

* chore: Use Compatible release clause in requirement files (#1762)

* Fix: SAM Crashes Invalid swagger models exception (#1765)

* Fix: Invalid swagger models exception

* Fix: Invalid resource policy exception

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Fix: DefaultAuth not a string exception (#1774)

* Fix: DefaultAuth not a string exception

* fix: userpool ref not a string

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Adding PermissionsBoundary property for State Machine resource (#1772)

* Adding PermissionsBoundary property for State Machine resource

* Add permissions_boundary to StateMachineGenerator and _construct_role docstrings

Co-authored-by: Vaib Suri <surivaib@amazon.com>

* fix: use newer policy name in gov & cn regions for xray (#1767)

* Add Description property to Api and HttApi resources (#1719)

* Update DEVELOPMENT_GUIDE; moved from rst to md (#1778)

* chore: bump version 1.30.0 (#1792)

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>
Co-authored-by: Mufaddal Makati <mufaddal@rawbytes.com>
Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
Co-authored-by: Vaib Suri <surivaib@amazon.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>

* Revert boto3 dependency pin to ~=1.5 (#1810) (#1812)

* Revert boto3 dependency pin to ~=1.5 (#1810)

* Move Tests to Appveyor (#1801)

* print python version

* update path vars

* update linux cmd

* update linux cmd

* update linux cmd

* update whitelist in tox

* update passenv

* update tox whitelisting

* update tox whitelisting

Co-authored-by: javulticat <31746850+javulticat@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>

* Update __init__.py (#1813)

* Fix merge conflicts 1.30.1 (#1815)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Release/v1.28.0 (#1754) (#1756)

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* bump sam-translator version to v1.28.0

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* bump version to 1.28.1 (#1758) (#1759)

* Fix merge conflict in release 1.29.0 (#1771)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* Feature toggle (#1737)

* Adding logic to pipe app config providers. Unit test pending

* Adding some documentation to config providers.

* Adding some unit tests and making black ignore json files.

* minor cleanup.

* Addressing PR comments.

* feature: Support MTLS auth properties in REST and HTTP API domain names (#1725)

* feature: Support MTLS auth properties in REST and HTTP API domain names

* fix unicode != str issue in py2.7

* add SecurityPolicy because default RESTAPI is using TLS1.0

* Add new property DisableExecuteApiEndpoint

* black reformat

* Address comments

* Add tests on invalid templates

* address test failures in py2.7

* restart travis tests

* fix: adding support for passing target id to EventBridgeRule (#1747)

* Manage black version using requirement file (#1748)

* chore: Manage black version in dev.txt

- config pre-commit
- config development guide
- config travis

Refer to the commit below in aws-sam-cli
https://github.com/aws/aws-sam-cli/commit/d725db5fbfc698a9f0c7582

* Format using black 20.8b1

* Opt-out black fron dev.txt for Python 2

* Release/v1.29.0 (#1769)

* Mq event source (#60)

* Support AmazonMQ as event source

* Set black hook language version to python3

* chore: version bump (#64)

* Black reformat

Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

* Release 1.30.0 (#1808)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* Feature toggle (#1737)

* Adding logic to pipe app config providers. Unit test pending

* Adding some documentation to config providers.

* Adding some unit tests and making black ignore json files.

* minor cleanup.

* Addressing PR comments.

* feature: Support MTLS auth properties in REST and HTTP API domain names (#1725)

* feature: Support MTLS auth properties in REST and HTTP API domain names

* fix unicode != str issue in py2.7

* add SecurityPolicy because default RESTAPI is using TLS1.0

* Add new property DisableExecuteApiEndpoint

* black reformat

* Address comments

* Add tests on invalid templates

* address test failures in py2.7

* restart travis tests

* fix: adding support for passing target id to EventBridgeRule (#1747)

* Manage black version using requirement file (#1748)

* chore: Manage black version in dev.txt

- config pre-commit
- config development guide
- config travis

Refer to the commit below in aws-sam-cli
https://github.com/aws/aws-sam-cli/commit/d725db5fbfc698a9f0c7582

* Format using black 20.8b1

* Opt-out black fron dev.txt for Python 2

* fix: Validate API request models (#1757)

* Backward merge master branch into develop (#1761)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Release/v1.28.0 (#1754) (#1756)

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* bump sam-translator version to v1.28.0

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* bump version to 1.28.1 (#1758) (#1759)

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* chore: Upgrade outdated dependencies in base.txt and dev.txt (#1744)

* chore: Update versions in in base.txt (no effective difference)

* chore: Update versions specified with ">=" in dev.txt

* Fallback pytest to 4.6.x for python2

* chore: Use Compatible release clause in requirement files (#1762)

* Fix: SAM Crashes Invalid swagger models exception (#1765)

* Fix: Invalid swagger models exception

* Fix: Invalid resource policy exception

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Fix: DefaultAuth not a string exception (#1774)

* Fix: DefaultAuth not a string exception

* fix: userpool ref not a string

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Adding PermissionsBoundary property for State Machine resource (#1772)

* Adding PermissionsBoundary property for State Machine resource

* Add permissions_boundary to StateMachineGenerator and _construct_role docstrings

Co-authored-by: Vaib Suri <surivaib@amazon.com>

* fix: use newer policy name in gov & cn regions for xray (#1767)

* Update __init__.py (#1775)

* Release/v1.29.0 (#1769) (#1773)

* Mq event source (#60)

* Support AmazonMQ as event source

* Set black hook language version to python3

* chore: version bump (#64)

* Black reformat

Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

* Add Description property to Api and HttApi resources (#1719)

* Update DEVELOPMENT_GUIDE; moved from rst to md (#1778)

* chore: bump version 1.30.0 (#1792)

* Fix conflicts release 1 30 (#1804)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Release/v1.28.0 (#1754) (#1756)

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* bump sam-translator version to v1.28.0

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* bump version to 1.28.1 (#1758) (#1759)

* Fix merge conflict in release 1.29.0 (#1771)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* Feature toggle (#1737)

* Adding logic to pipe app config providers. Unit test pending

* Adding some documentation to config providers.

* Adding some unit tests and making black ignore json files.

* minor cleanup.

* Addressing PR comments.

* feature: Support MTLS auth properties in REST and HTTP API domain names (#1725)

* feature: Support MTLS auth properties in REST and HTTP API domain names

* fix unicode != str issue in py2.7

* add SecurityPolicy because default RESTAPI is using TLS1.0

* Add new property DisableExecuteApiEndpoint

* black reformat

* Address comments

* Add tests on invalid templates

* address test failures in py2.7

* restart travis tests

* fix: adding support for passing target id to EventBridgeRule (#1747)

* Manage black version using requirement file (#1748)

* chore: Manage black version in dev.txt

- config pre-commit
- config development guide
- config travis

Refer to the commit below in aws-sam-cli
https://github.com/aws/aws-sam-cli/commit/d725db5fbfc698a9f0c7582

* Format using black 20.8b1

* Opt-out black fron dev.txt for Python 2

* Release/v1.29.0 (#1769)

* Mq event source (#60)

* Support AmazonMQ as event source

* Set black hook language version to python3

* chore: version bump (#64)

* Black reformat

Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

* fix: Validate API request models (#1757)

* chore: Upgrade outdated dependencies in base.txt and dev.txt (#1744)

* chore: Update versions in in base.txt (no effective difference)

* chore: Update versions specified with ">=" in dev.txt

* Fallback pytest to 4.6.x for python2

* chore: Use Compatible release clause in requirement files (#1762)

* Fix: SAM Crashes Invalid swagger models exception (#1765)

* Fix: Invalid swagger models exception

* Fix: Invalid resource policy exception

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Fix: DefaultAuth not a string exception (#1774)

* Fix: DefaultAuth not a string exception

* fix: userpool ref not a string

Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>

* Adding PermissionsBoundary property for State Machine resource (#1772)

* Adding PermissionsBoundary property for State Machine resource

* Add permissions_boundary to StateMachineGenerator and _construct_role docstrings

Co-authored-by: Vaib Suri <surivaib@amazon.com>

* fix: use newer policy name in gov & cn regions for xray (#1767)

* Add Description property to Api and HttApi resources (#1719)

* Update DEVELOPMENT_GUIDE; moved from rst to md (#1778)

* chore: bump version 1.30.0 (#1792)

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>
Co-authored-by: Mufaddal Makati <mufaddal@rawbytes.com>
Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
Co-authored-by: Vaib Suri <surivaib@amazon.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>

* Move Tests to Appveyor (#1801)

* print python version

* update path vars

* update linux cmd

* update linux cmd

* update linux cmd

* update whitelist in tox

* update passenv

* update tox whitelisting

* update tox whitelisting

Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Mufaddal Makati <mufaddal@rawbytes.com>
Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
Co-authored-by: Vaib Suri <surivaib@amazon.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>
Co-authored-by: Mufaddal Makati <mufaddal@rawbytes.com>
Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
Co-authored-by: Vaib Suri <surivaib@amazon.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>
Co-authored-by: Mufaddal Makati <mufaddal@rawbytes.com>
Co-authored-by: Mufaddal Makati <mmmakati@amazon.com>
Co-authored-by: Adam Wong <55506708+wong-a@users.noreply.github.com>
Co-authored-by: Vaib Suri <surivaib@amazon.com>
Co-authored-by: Anton Grübel <anton.gruebel@gmail.com>
Co-authored-by: Qingchuan Ma <69653965+qingchm@users.noreply.github.com>
Co-authored-by: javulticat <31746850+javulticat@users.noreply.github.com>

* feature: Support for Lambda Code Signing (#53) (#1825) (#1828)

* feature: add support for CFN fields for lambda signing (#53)

* feature: add support for CFN fields for lambda signing

* feature: add support for CFN fields for lambda signing (update formatting)

* feature: add support for CFN fields for lambda signing (update patching)

* feature: add support for CFN fields for lambda signing (update template)

* Revert "feat: add explicit UpdateReplacePolicy (#1481)" (#1568)

* docs: document IpV6 option on Domain Configuration object (#1588)

* chore: Exclude test modules in whl (#1597)

* feat: Add Step Function Resource (#1601)

Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>

* Release Changes for 1.25.0

* feature: add support for CFN fields for lambda signing

* feature: add support for CFN fields for lambda signing (slight code update)

* feature: add support for CFN fields for lambda signing (update globals.py)

Co-authored-by: Shreya <shreyagangishetty@gmail.com>
Co-authored-by: Timo Schilling <timo@schilling.io>
Co-authored-by: Jacob Fuss <32497805+jfuss@users.noreply.github.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>

* Move Tests to Appveyor (#1801)

* print python version

* update path vars

* update linux cmd

* update linux cmd

* update linux cmd

* update whitelist in tox

* update passenv

* update tox whitelisting

* update tox whitelisting

Co-authored-by: Shreya <shreyagangishetty@gmail.com>
Co-authored-by: Timo Schilling <timo@schilling.io>
Co-authored-by: Jacob Fuss <32497805+jfuss@users.noreply.github.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>

Co-authored-by: Shreya <shreyagangishetty@gmail.com>
Co-authored-by: Timo Schilling <timo@schilling.io>
Co-authored-by: Jacob Fuss <32497805+jfuss@users.noreply.github.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>

* Release v1.31.0 (#1836)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Release/v1.28.0 (#1754) (#1756)

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* bump sam-translator version to v1.28.0

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

Co-authored-by: Tolledo <ps.tolledo@gmail.com>

* bump version to 1.28.1 (#1758) (#1759)

* Fix merge conflict in release 1.29.0 (#1771)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Update __init__.py (#1704)

* Release/v1.27.0 resolveconflict (#1717)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and v2). (#1670)

* Adding authorization scopes as list validation in ApiGatewayAuthorizer and ApiGatewayV2Authorizer.

* make black.

* Adding functional test for invalid auth scope.

* adding error condition for invalid test.

* removing test template file.

* feat: MSK event type support for AWS::Serverless::Function (#52)

Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>

* Lambdaauth (#1733)

* Add support for Lambda Authorizers in HttpAPI

* Address comments and fix formatting

* fix version

* Validate input parameters. Update tests

* black reformat

Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>

* Feature toggle (#1737)

* Adding logic to pipe app config providers. Unit test pending

* Adding some documentation to config providers.

* Adding some unit tests and making black ignore json files.

* minor cleanup.

* Addressing PR comments.

* feature: Support MTLS auth properties in REST and HTTP API domain names (#1725)

* feature: Support MTLS auth properties in REST and HTTP API domain names

* fix unicode != str issue in py2.7

* add SecurityPolicy because default RESTAPI is using TLS1.0

* Add new property DisableExecuteApiEndpoint

* black reformat

* Address comments

* Add tests on invalid templates

* address test failures in py2.7

* restart travis tests

* fix: adding support for passing target id to EventBridgeRule (#1747)

* Manage black version using requirement file (#1748)

* chore: Manage black version in dev.txt

- config pre-commit
- config development guide
- config travis

Refer to the commit below in aws-sam-cli
https://github.com/aws/aws-sam-cli/commit/d725db5fbfc698a9f0c7582

* Format using black 20.8b1

* Opt-out black fron dev.txt for Python 2

* Release/v1.29.0 (#1769)

* Mq event source (#60)

* Support AmazonMQ as event source

* Set black hook language version to python3

* chore: version bump (#64)

* Black reformat

Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

Co-authored-by: Cosh_ <CoshUS@users.noreply.github.com>
Co-authored-by: Raymond Wang <14915548+wchengru@users.noreply.github.com>
Co-authored-by: Sriram Madapusi Vasudevan <3770774+sriram-mv@users.noreply.github.com>
Co-authored-by: Steve Brown <steve@fabric.com>
Co-authored-by: jtaylor00 <joetaylor00@gmail.com>
Co-authored-by: Jacob Fuss <jfuss@users.noreply.github.com>
Co-authored-by: Alex Wood <awood45@gmail.com>
Co-authored-by: Tarun <c2tarun@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
Co-authored-by: Tolledo <ps.tolledo@gmail.com>
Co-authored-by: _sam <3804518+aahung@users.noreply.github.com>
Co-authored-by: Kaidi He <73141777+kaidih@users.noreply.github.com>

* Release 1.30.0 (#1808)

* Fix: Updated Slack Invite Link (#1712)

* Updated Slack Invite Link

* Restricted jsonschema to Python 2

* Forced pyrsistent to 0.16 in Python 2

* Reverted Changes to enum34

* Merge master back to develop (#1734)

* Release v1.26.0 (#1680)

* feat: add support for VPCEndpointIds in EndpointConfiguration

* fix: update formatting with black

* docs: update 2016-10-31.md

* docs: added api endpointconfiguration example

* docs: make example more generic

* fix: remove nested EndpointConfiguration types from output

* fix: only allow one EndpointConfiguration Type

* doc: update example to reflect only allowing one EndpointConfiguration
Type

* fix : missing UserPool properties (#1506) (#1581)

* fix: resource policy generation for {path+} (#1580)

* refactor: Remove 2016-10-31 examples

* update PR template

* adjust pr template

* Adding authorization scopes as list validation in ApiGatewayAuthorizer (v1 and …
  • Loading branch information
1 parent b8dbf3f commit afcb3d3
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 1 deletion.
6 changes: 6 additions & 0 deletions integration/helpers/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
class BaseTest(TestCase):
@classmethod
def setUpClass(cls):
cls.FUNCTION_OUTPUT = "hello"
cls.tests_integ_dir = Path(__file__).resolve().parents[1]
cls.resources_dir = Path(cls.tests_integ_dir, "resources")
cls.template_dir = Path(cls.resources_dir, "templates", "single")
Expand Down Expand Up @@ -216,6 +217,11 @@ def get_api_v2_stack_stages(self):

return self.client_provider.api_v2_client.get_stages(ApiId=resources[0]["PhysicalResourceId"])["Items"]

def get_api_v2_endpoint(self, logical_id):
api_id = self.get_physical_id_by_logical_id(logical_id)
api = self.client_provider.api_v2_client.get_api(ApiId=api_id)
return api["ApiEndpoint"]

def get_stack_nested_stack_resources(self):
resources = self.get_stack_resources("AWS::CloudFormation::Stack")

Expand Down
Binary file modified integration/resources/code/code.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{ "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" },
{ "LogicalResourceId":"MyLambdaFunctionAliaslive", "ResourceType":"AWS::Lambda::Alias" },
{ "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" },
{ "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" },
{ "LogicalResourceId":"MyLambdaFunctionFooEventPermission", "ResourceType":"AWS::Lambda::Permission" },
{ "LogicalResourceId":"MyLambdaFunctionBarEventPermission", "ResourceType":"AWS::Lambda::Permission" },
{ "LogicalResourceId":"MyHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" },
{ "LogicalResourceId":"MyHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{ "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" },
{ "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" },
{ "LogicalResourceId":"MyLambdaFunctionFooEventPermission", "ResourceType":"AWS::Lambda::Permission" },
{ "LogicalResourceId":"MyHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" },
{ "LogicalResourceId":"MyHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Resources:
MyHttpApi:
Type: AWS::Serverless::HttpApi
MyLambdaFunction:
Type: AWS::Serverless::Function
Properties:
AutoPublishAlias: live
Handler: index.handler
Runtime: nodejs12.x
CodeUri: ${codeuri}
Events:
FooEvent:
Type: HttpApi
Properties:
ApiId:
Ref: MyHttpApi
BarEvent:
Type: HttpApi
Properties:
ApiId:
Ref: MyHttpApi
Path: /bar
Method: POST
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Resources:
MyHttpApi:
Type: AWS::Serverless::HttpApi
MyLambdaFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs12.x
CodeUri: ${codeuri}
Events:
FooEvent:
Type: HttpApi
Properties:
ApiId:
Ref: MyHttpApi
BarEvent:
Type: HttpApi
Properties:
ApiId:
Ref: MyHttpApi
Path: /bar
Method: POST
14 changes: 14 additions & 0 deletions integration/single/test_basic_function.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import requests
from parameterized import parameterized
from integration.helpers.base_test import BaseTest

Expand Down Expand Up @@ -26,6 +27,19 @@ def test_basic_function(self, file_name):

self.assertEqual(self.get_resource_status_by_logical_id("MyLambdaFunction"), "UPDATE_COMPLETE")

@parameterized.expand(
[
"function_with_http_api_events",
"function_alias_with_http_api_events",
]
)
def test_function_with_http_api_events(self, file_name):
self.create_and_verify_stack(file_name)

endpoint = self.get_api_v2_endpoint("MyHttpApi")

self.assertEqual(requests.get(endpoint).text, self.FUNCTION_OUTPUT)

@parameterized.expand(
[
("basic_function_with_sns_dlq", "sns:Publish"),
Expand Down
9 changes: 8 additions & 1 deletion samtranslator/open_api/open_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ def get_integration_function_logical_id(self, path_name, method_name):

# Extract lambda integration (${LambdaName.Arn}) and split ".Arn" off from it
regex = "([A-Za-z0-9]+\.Arn)"
match = re.findall(regex, arn)[0].split(".Arn")[0]
matches = re.findall(regex, arn)
# Prevent IndexError when integration URI doesn't contain .Arn (e.g. a Function with
# AutoPublishAlias translates to AWS::Lambda::Alias, which make_shorthand represents
# as LogicalId instead of LogicalId.Arn).
# TODO: Consistent handling of Functions with and without AutoPublishAlias (see #1901)
if not matches:
return False
match = matches[0].split(".Arn")[0]
return match

def method_has_integration(self, method):
Expand Down
47 changes: 47 additions & 0 deletions tests/openapi/test_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,50 @@ def test_must_not_add_description_if_already_defined(self):
editor = OpenApiEditor(self.original_openapi_with_description)
editor.add_description("New Description")
self.assertEqual(editor.openapi["info"]["description"], "Existing Description")


class TestOpenApiEditor_get_integration_function_of_alias(TestCase):
def setUp(self):

self.original_openapi = {
"openapi": "3.0.1",
"paths": {
"$default": {
"x-amazon-apigateway-any-method": {
"Fn::If": [
"condition",
{
"security": [{"OpenIdAuth": ["scope1", "scope2"]}],
"isDefaultRoute": True,
"x-amazon-apigateway-integration": {
"httpMethod": "POST",
"type": "aws_proxy",
"uri": {
"Fn::If": [
"condition",
{
"Fn::Sub": "arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${HttpApiFunctionAlias}/invocations"
},
{"Ref": "AWS::NoValue"},
]
},
"payloadFormatVersion": "1.0",
},
"responses": {},
},
{"Ref": "AWS::NoValue"},
]
}
},
"/bar": {},
"/badpath": "string value",
},
}

self.editor = OpenApiEditor(self.original_openapi)

def test_no_logical_id_if_alias(self):

self.assertFalse(
self.editor.get_integration_function_logical_id(OpenApiEditor._DEFAULT_PATH, OpenApiEditor._X_ANY_METHOD),
)

0 comments on commit afcb3d3

Please sign in to comment.