From f6d8dab06aab776d559075e515761f6ad87e6973 Mon Sep 17 00:00:00 2001 From: Sam Liu Date: Wed, 2 Nov 2022 14:14:15 -0700 Subject: [PATCH] chore: Format and enforce formatting for yaml/json in integration/ --- Makefile | 8 +- integration/config/code_key_to_file_map.json | 14 +- integration/config/file_to_s3_map.json | 47 +++- integration/resources/code/swagger1.json | 238 ++++++++--------- integration/resources/code/swagger2.json | 144 +++++----- integration/resources/code/template.yaml | 6 +- .../combination/all_policy_templates.json | 32 ++- .../api_with_authorizer_apikey.json | 67 ++++- ...h_authorizers_invokefunction_set_none.json | 67 ++++- .../combination/api_with_authorizers_max.json | 97 +++++-- .../api_with_authorizers_max_openapi.json | 117 ++++++-- .../combination/api_with_authorizers_min.json | 82 ++++-- .../api_with_binary_media_types.json | 17 +- ...nary_media_types_with_definition_body.json | 17 +- ...ia_types_with_definition_body_openapi.json | 32 ++- .../expected/combination/api_with_cors.json | 37 ++- .../api_with_cors_only_headers.json | 37 ++- .../api_with_cors_only_max_age.json | 37 ++- .../api_with_cors_only_methods.json | 37 ++- .../combination/api_with_cors_openapi.json | 37 ++- .../combination/api_with_cors_shorthand.json | 37 ++- .../api_with_custom_domains_edge.json | 47 +++- ...th_custom_domains_edge_feature_toggle.json | 47 +++- .../api_with_custom_domains_regional.json | 57 +++- ...ustom_domains_regional_feature_toggle.json | 57 +++- ...mains_regional_ownership_verification.json | 57 +++- ...ownership_verification_feature_toggle.json | 57 +++- ...api_with_disable_execute_api_endpoint.json | 30 ++- ...isable_execute_api_endpoint_openapi_3.json | 30 ++- .../api_with_endpoint_configuration.json | 17 +- .../api_with_endpoint_configuration_dict.json | 17 +- .../api_with_fail_on_warnings.json | 32 ++- .../api_with_gateway_responses.json | 32 ++- .../combination/api_with_method_settings.json | 17 +- .../combination/api_with_request_models.json | 32 ++- .../api_with_request_models_openapi.json | 32 ++- .../api_with_request_parameters_openapi.json | 37 ++- .../api_with_resource_policies.json | 37 ++- ...pi_with_resource_policies_aws_account.json | 32 ++- .../combination/api_with_resource_refs.json | 17 +- .../combination/api_with_usage_plan.json | 92 +++++-- .../connector_bucket_to_function_write.json | 2 +- ...nnector_event_rule_to_eb_custom_write.json | 2 +- ...nector_event_rule_to_eb_default_write.json | 2 +- .../connector_event_rule_to_lambda_write.json | 2 +- .../connector_event_rule_to_sfn_write.json | 2 +- .../connector_event_rule_to_sns_write.json | 2 +- .../connector_event_rule_to_sqs_write.json | 2 +- .../connector_function_to_bucket_read.json | 2 +- .../connector_function_to_bucket_write.json | 2 +- .../connector_function_to_eventbus_write.json | 2 +- .../connector_function_to_function.json | 2 +- .../connector_function_to_queue_read.json | 2 +- .../connector_function_to_queue_write.json | 2 +- .../connector_function_to_sfn_read.json | 2 +- .../connector_function_to_sfn_write.json | 2 +- .../connector_function_to_table_read.json | 2 +- .../connector_function_to_table_write.json | 2 +- .../connector_function_to_topic_write.json | 2 +- .../connector_httpapi_to_function.json | 2 +- .../connector_restapi_to_function.json | 2 +- .../connector_sfn_to_bucket_read.json | 2 +- .../connector_sfn_to_bucket_write.json | 2 +- .../connector_sfn_to_eb_custom_write.json | 2 +- .../connector_sfn_to_eb_default_write.json | 2 +- .../connector_sfn_to_function_write.json | 2 +- .../connector_sfn_to_sfn_async.json | 2 +- .../connector_sfn_to_sfn_sync.json | 2 +- .../connector_sfn_to_sns_write.json | 2 +- .../connector_sfn_to_sqs_write.json | 2 +- .../connector_sfn_to_table_read.json | 2 +- .../connector_sfn_to_table_write.json | 2 +- .../connector_sns_to_function_write.json | 2 +- .../connector_sqs_to_function.json | 2 +- .../connector_table_to_function_read.json | 2 +- .../connector_topic_to_queue_write.json | 2 +- .../expected/combination/depends_on.json | 17 +- .../combination/function_with_alias.json | 22 +- ...function_with_alias_and_event_sources.json | 127 +++++++-- .../function_with_alias_globals.json | 42 ++- .../function_with_alias_intrinsics.json | 22 +- .../function_with_all_event_types.json | 147 +++++++--- ..._with_all_event_types_condition_false.json | 22 +- .../combination/function_with_api.json | 37 ++- .../function_with_application.json | 17 +- .../function_with_cloudwatch_log.json | 27 +- .../function_with_custom_code_deploy.json | 42 ++- ...unction_with_cwe_dlq_and_retry_policy.json | 27 +- .../function_with_cwe_dlq_generated.json | 32 ++- ...tion_with_deployment_alarms_and_hooks.json | 72 +++-- .../function_with_deployment_basic.json | 37 ++- ...eployment_default_role_managed_policy.json | 37 ++- .../function_with_deployment_disabled.json | 27 +- .../function_with_deployment_globals.json | 37 ++- .../combination/function_with_dynamodb.json | 22 +- .../function_with_file_system_config.json | 32 ++- .../combination/function_with_http_api.json | 27 +- .../function_with_http_api_default_path.json | 27 +- ...tion_with_implicit_api_and_conditions.json | 62 ++++- .../function_with_implicit_http_api.json | 27 +- .../combination/function_with_kinesis.json | 22 +- .../function_with_kinesis_intrinsics.json | 22 +- .../combination/function_with_layer.json | 17 +- .../combination/function_with_mq.json | 47 +++- .../function_with_mq_using_autogen_role.json | 47 +++- .../combination/function_with_msk.json | 22 +- ...unction_with_msk_using_managed_policy.json | 22 +- .../function_with_policy_templates.json | 17 +- .../function_with_resource_refs.json | 32 ++- .../combination/function_with_s3.json | 22 +- .../function_with_s3_intrinsics.json | 2 +- .../combination/function_with_schedule.json | 22 +- ...on_with_schedule_dlq_and_retry_policy.json | 27 +- .../function_with_schedule_dlq_generated.json | 32 ++- .../function_with_self_managed_kafka.json | 2 +- ...on_with_self_managed_kafka_intrinsics.json | 2 +- .../function_with_signing_profile.json | 22 +- .../combination/function_with_sns.json | 47 +++- .../function_with_sns_intrinsics.json | 2 +- .../combination/function_with_sqs.json | 22 +- .../function_with_userpool_event.json | 22 +- .../combination/http_api_with_auth.json | 47 +++- .../combination/http_api_with_cors.json | 27 +- ...http_api_with_custom_domains_regional.json | 52 +++- ...ustom_domains_regional_feature_toggle.json | 52 +++- ...mains_regional_ownership_verification.json | 52 +++- ...ownership_verification_feature_toggle.json | 52 +++- ...th_disable_execute_api_endpoint_false.json | 32 ++- ...ith_disable_execute_api_endpoint_true.json | 32 ++- .../implicit_api_with_settings.json | 32 ++- .../intrinsics_code_definition_uri.json | 27 +- .../intrinsics_serverless_api.json | 37 ++- .../intrinsics_serverless_function.json | 17 +- .../combination/state_machine_with_api.json | 52 +++- .../combination/state_machine_with_cwe.json | 22 +- .../state_machine_with_cwe_dlq_generated.json | 32 ++- ...ne_with_cwe_with_dlq_and_retry_policy.json | 27 +- .../state_machine_with_policy_templates.json | 27 +- .../state_machine_with_schedule.json | 22 +- ...ne_with_schedule_dlq_and_retry_policy.json | 27 +- ...e_machine_with_schedule_dlq_generated.json | 32 ++- .../resources/expected/single/basic_api.json | 15 +- .../single/basic_api_inline_openapi.json | 15 +- .../single/basic_api_inline_swagger.json | 15 +- .../single/basic_api_inline_with_cache.json | 15 +- .../single/basic_api_inline_with_tags.json | 15 +- .../expected/single/basic_api_with_mode.json | 47 +++- .../single/basic_api_with_mode_update.json | 42 ++- .../expected/single/basic_api_with_tags.json | 17 +- .../single/basic_application_s3_location.json | 5 +- .../basic_application_sar_location.json | 5 +- ...lication_sar_location_with_intrinsics.json | 10 +- .../expected/single/basic_function.json | 10 +- .../basic_function_event_destinations.json | 62 ++++- .../single/basic_function_no_envvar.json | 12 +- .../single/basic_function_openapi.json | 12 +- .../basic_function_with_arm_architecture.json | 2 +- ...sic_function_with_function_url_config.json | 2 +- ...th_function_url_with_autopuplishalias.json | 2 +- .../single/basic_function_with_kmskeyarn.json | 15 +- .../single/basic_function_with_sns_dlq.json | 17 +- .../single/basic_function_with_sqs_dlq.json | 17 +- .../single/basic_function_with_tags.json | 10 +- .../single/basic_function_with_tracing.json | 22 +- .../basic_function_with_x86_architecture.json | 2 +- .../expected/single/basic_http_api.json | 12 +- .../expected/single/basic_layer.json | 7 +- ...ic_layer_with_compatible_architecture.json | 7 +- .../single/basic_layer_with_parameters.json | 7 +- ...basic_state_machine_inline_definition.json | 12 +- .../single/basic_state_machine_with_tags.json | 10 +- .../function_alias_with_http_api_events.json | 40 ++- ...oyment_preference_alarms_intrinsic_if.json | 2 +- .../function_with_ephemeral_storage.json | 12 +- .../single/function_with_http_api_events.json | 25 +- .../combination/all_policy_templates.yaml | 250 +++++++++--------- .../api_with_authorizer_apikey.yaml | 46 ++-- ...h_authorizers_invokefunction_set_none.yaml | 10 +- .../combination/api_with_authorizers_max.yaml | 54 ++-- .../api_with_authorizers_max_openapi.yaml | 90 +++---- .../combination/api_with_authorizers_min.yaml | 30 +-- .../api_with_binary_media_types.yaml | 7 +- ...nary_media_types_with_definition_body.yaml | 30 +-- ...ia_types_with_definition_body_openapi.yaml | 24 +- .../templates/combination/api_with_cors.yaml | 22 +- .../api_with_cors_only_headers.yaml | 18 +- .../api_with_cors_only_max_age.yaml | 18 +- .../api_with_cors_only_methods.yaml | 18 +- .../combination/api_with_cors_openapi.yaml | 22 +- .../combination/api_with_cors_shorthand.yaml | 18 +- .../api_with_custom_domains_edge.yaml | 4 +- .../api_with_custom_domains_regional.yaml | 6 +- ...mains_regional_ownership_verification.yaml | 4 +- ...api_with_disable_execute_api_endpoint.yaml | 4 +- ...isable_execute_api_endpoint_openapi_3.yaml | 4 +- .../api_with_endpoint_configuration.yaml | 5 +- .../api_with_endpoint_configuration_dict.yaml | 1 - .../api_with_fail_on_warnings.yaml | 2 +- .../api_with_gateway_responses.yaml | 8 +- .../combination/api_with_method_settings.yaml | 9 +- .../combination/api_with_request_models.yaml | 4 +- .../api_with_request_models_openapi.yaml | 4 +- .../api_with_request_parameters_openapi.yaml | 16 +- .../api_with_resource_policies.yaml | 36 ++- ...pi_with_resource_policies_aws_account.yaml | 18 +- .../combination/api_with_resource_refs.yaml | 1 - .../combination/api_with_usage_plan.yaml | 101 ++++--- .../connector_bucket_to_function_write.yaml | 17 +- ...nnector_event_rule_to_eb_custom_write.yaml | 36 +-- ...nector_event_rule_to_eb_default_write.yaml | 34 +-- .../connector_event_rule_to_lambda_write.yaml | 22 +- .../connector_event_rule_to_sfn_write.yaml | 34 +-- .../connector_event_rule_to_sns_write.yaml | 20 +- .../connector_event_rule_to_sqs_write.yaml | 18 +- .../connector_function_to_bucket_read.yaml | 14 +- .../connector_function_to_bucket_write.yaml | 14 +- .../connector_function_to_eventbus_write.yaml | 16 +- .../connector_function_to_function.yaml | 26 +- .../connector_function_to_queue_read.yaml | 14 +- .../connector_function_to_queue_write.yaml | 14 +- .../connector_function_to_sfn_read.yaml | 10 +- .../connector_function_to_sfn_write.yaml | 10 +- .../connector_function_to_table_read.yaml | 24 +- .../connector_function_to_table_write.yaml | 14 +- .../connector_function_to_topic_write.yaml | 14 +- .../connector_httpapi_to_function.yaml | 28 +- .../connector_restapi_to_function.yaml | 36 +-- .../connector_sfn_to_bucket_read.yaml | 10 +- .../connector_sfn_to_bucket_write.yaml | 12 +- .../connector_sfn_to_eb_custom_write.yaml | 18 +- .../connector_sfn_to_eb_default_write.yaml | 18 +- .../connector_sfn_to_function_write.yaml | 8 +- .../connector_sfn_to_sfn_async.yaml | 14 +- .../connector_sfn_to_sfn_sync.yaml | 14 +- .../connector_sfn_to_sns_write.yaml | 8 +- .../connector_sfn_to_sqs_write.yaml | 8 +- .../connector_sfn_to_table_read.yaml | 16 +- .../connector_sfn_to_table_write.yaml | 16 +- .../connector_sns_to_function_write.yaml | 59 ++--- .../connector_sqs_to_function.yaml | 26 +- .../connector_table_to_function_read.yaml | 30 +-- .../connector_topic_to_queue_write.yaml | 32 +-- .../templates/combination/depends_on.yaml | 46 ++-- ...function_with_alias_and_event_sources.yaml | 11 +- .../function_with_alias_intrinsics.yaml | 24 +- .../function_with_all_event_types.yaml | 20 +- ..._with_all_event_types_condition_false.yaml | 20 +- .../combination/function_with_api.yaml | 2 +- .../function_with_application.yaml | 12 +- .../function_with_cloudwatch_log.yaml | 6 +- .../function_with_custom_code_deploy.yaml | 34 ++- ...unction_with_cwe_dlq_and_retry_policy.yaml | 18 +- .../function_with_cwe_dlq_generated.yaml | 17 +- ...tion_with_deployment_alarms_and_hooks.yaml | 236 ++++++++--------- .../function_with_deployment_basic.yaml | 32 ++- ...eployment_default_role_managed_policy.yaml | 2 +- .../function_with_deployment_disabled.yaml | 32 ++- .../function_with_deployment_globals.yaml | 32 ++- .../combination/function_with_dynamodb.yaml | 15 +- .../function_with_file_system_config.yaml | 19 +- .../combination/function_with_http_api.yaml | 10 +- .../function_with_http_api_default_path.yaml | 6 +- ...tion_with_implicit_api_and_conditions.yaml | 68 ++--- .../function_with_implicit_http_api.yaml | 4 +- .../combination/function_with_kinesis.yaml | 2 +- .../function_with_kinesis_intrinsics.yaml | 40 +-- .../combination/function_with_layer.yaml | 15 +- .../combination/function_with_mq.yaml | 119 ++++----- .../function_with_mq_using_autogen_role.yaml | 68 ++--- .../combination/function_with_msk.yaml | 40 ++- ...unction_with_msk_using_managed_policy.yaml | 9 +- .../function_with_policy_templates.yaml | 34 +-- .../function_with_resource_refs.yaml | 8 +- .../function_with_s3_intrinsics.yaml | 22 +- .../combination/function_with_schedule.yaml | 12 +- ...on_with_schedule_dlq_and_retry_policy.yaml | 30 +-- .../function_with_schedule_dlq_generated.yaml | 30 +-- .../function_with_self_managed_kafka.yaml | 13 +- ...on_with_self_managed_kafka_intrinsics.yaml | 9 +- .../function_with_signing_profile.yaml | 48 ++-- .../combination/function_with_sns.yaml | 3 +- .../function_with_sns_intrinsics.yaml | 22 +- .../combination/function_with_sqs.yaml | 4 +- .../function_with_userpool_event.yaml | 34 +-- .../combination/http_api_with_auth.yaml | 34 +-- .../http_api_with_auth_updated.yaml | 16 +- .../combination/http_api_with_cors.yaml | 29 +- ...http_api_with_custom_domains_regional.yaml | 8 +- ...mains_regional_ownership_verification.yaml | 4 +- ...th_disable_execute_api_endpoint_false.yaml | 8 +- ...ith_disable_execute_api_endpoint_true.yaml | 6 +- .../implicit_api_with_settings.yaml | 13 +- .../intrinsics_code_definition_uri.yaml | 13 +- .../intrinsics_serverless_api.yaml | 19 +- .../intrinsics_serverless_function.yaml | 46 ++-- .../combination/state_machine_with_api.yaml | 26 +- .../combination/state_machine_with_cwe.yaml | 20 +- .../state_machine_with_cwe_dlq_generated.yaml | 28 +- ...ne_with_cwe_with_dlq_and_retry_policy.yaml | 28 +- .../state_machine_with_policy_templates.yaml | 18 +- .../state_machine_with_schedule.yaml | 22 +- ...ne_with_schedule_dlq_and_retry_policy.yaml | 30 +-- ...e_machine_with_schedule_dlq_generated.yaml | 30 +-- .../single/basic_api_inline_openapi.yaml | 24 +- .../single/basic_api_inline_swagger.yaml | 24 +- .../templates/single/basic_api_with_mode.yaml | 2 +- .../single/basic_api_with_mode_update.yaml | 3 +- .../templates/single/basic_api_with_tags.yaml | 4 +- ...lication_sar_location_with_intrinsics.yaml | 6 +- .../templates/single/basic_function.yaml | 28 +- .../basic_function_event_destinations.yaml | 186 ++++++------- .../single/basic_function_no_envvar.yaml | 20 +- .../single/basic_function_openapi.yaml | 32 +-- .../basic_function_with_arm_architecture.yaml | 17 +- ...sic_function_with_function_url_config.yaml | 40 +-- ...th_function_url_with_autopuplishalias.yaml | 42 +-- .../single/basic_function_with_kmskeyarn.yaml | 57 ++-- .../single/basic_function_with_sns_dlq.yaml | 2 +- .../single/basic_function_with_sqs_dlq.yaml | 3 +- .../single/basic_function_with_tags.yaml | 26 +- .../single/basic_function_with_tracing.yaml | 46 ++-- .../basic_function_with_x86_architecture.yaml | 19 +- .../templates/single/basic_http_api.yaml | 2 +- .../templates/single/basic_layer.yaml | 10 +- ...ic_layer_with_compatible_architecture.yaml | 45 ++-- .../single/basic_layer_with_parameters.yaml | 82 +++--- ...basic_state_machine_inline_definition.yaml | 10 +- .../single/basic_state_machine_with_tags.yaml | 10 +- ...oyment_preference_alarms_intrinsic_if.yaml | 18 +- .../function_with_ephemeral_storage.yaml | 32 +-- integration/setup/companion-stack.yaml | 36 +-- integration/setup/example-sar-app.yaml | 2 +- 332 files changed, 5551 insertions(+), 3224 deletions(-) diff --git a/Makefile b/Makefile index 6da84ab352..3de10709d4 100755 --- a/Makefile +++ b/Makefile @@ -19,13 +19,13 @@ integ-test: black: black setup.py samtranslator/* tests/* integration/* bin/*.py - bin/json-format.py --write tests - bin/yaml-format.py --write tests + bin/json-format.py --write tests integration + bin/yaml-format.py --write tests integration black-check: black --check setup.py samtranslator/* tests/* integration/* bin/*.py - bin/json-format.py --check tests - bin/yaml-format.py --check tests + bin/json-format.py --check tests integration + bin/yaml-format.py --check tests integration lint: # mypy performs type check diff --git a/integration/config/code_key_to_file_map.json b/integration/config/code_key_to_file_map.json index 75ab8c0d02..a58131d850 100644 --- a/integration/config/code_key_to_file_map.json +++ b/integration/config/code_key_to_file_map.json @@ -1,8 +1,8 @@ { - "codeuri": "code.zip", - "contenturi": "layer1.zip", - "definitionuri": "swagger1.json", - "templateurl": "template.yaml", - "binaryMediaCodeUri": "binary-media.zip", - "mtlsuri": "MTLSCert.pem" -} \ No newline at end of file + "binaryMediaCodeUri": "binary-media.zip", + "codeuri": "code.zip", + "contenturi": "layer1.zip", + "definitionuri": "swagger1.json", + "mtlsuri": "MTLSCert.pem", + "templateurl": "template.yaml" +} diff --git a/integration/config/file_to_s3_map.json b/integration/config/file_to_s3_map.json index c8096eefc3..204409bbd2 100644 --- a/integration/config/file_to_s3_map.json +++ b/integration/config/file_to_s3_map.json @@ -1,11 +1,38 @@ { - "code.zip": {"type": "s3", "uri": ""}, - "code2.zip": {"type": "s3", "uri": ""}, - "layer1.zip": {"type": "s3", "uri": ""}, - "swagger1.json": {"type": "s3", "uri": ""}, - "swagger2.json": {"type": "s3", "uri": ""}, - "binary-media.zip": {"type": "s3", "uri": ""}, - "template.yaml": {"type": "http", "uri": ""}, - "MTLSCert.pem": {"type": "s3", "uri": ""}, - "MTLSCert-Updated.pem": {"type": "s3", "uri": ""} -} \ No newline at end of file + "MTLSCert-Updated.pem": { + "type": "s3", + "uri": "" + }, + "MTLSCert.pem": { + "type": "s3", + "uri": "" + }, + "binary-media.zip": { + "type": "s3", + "uri": "" + }, + "code.zip": { + "type": "s3", + "uri": "" + }, + "code2.zip": { + "type": "s3", + "uri": "" + }, + "layer1.zip": { + "type": "s3", + "uri": "" + }, + "swagger1.json": { + "type": "s3", + "uri": "" + }, + "swagger2.json": { + "type": "s3", + "uri": "" + }, + "template.yaml": { + "type": "http", + "uri": "" + } +} diff --git a/integration/resources/code/swagger1.json b/integration/resources/code/swagger1.json index 81d235a108..ca8e572a4c 100644 --- a/integration/resources/code/swagger1.json +++ b/integration/resources/code/swagger1.json @@ -1,12 +1,13 @@ { - "swagger": "2.0", + "definitions": { + "Empty": { + "type": "object" + } + }, "info": { - "title": "PetStore", - "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints" + "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints", + "title": "PetStore" }, - "schemes": [ - "https" - ], "paths": { "/": { "get": { @@ -27,264 +28,264 @@ } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Content-Type": "'text/html'" }, "responseTemplates": { "text/html": "\n \n \n \n \n

Welcome to your Pet Store API

\n

\n You have succesfully deployed your first API. You are seeing this HTML page because the GET method to the root resource of your API returns this content as a Mock integration.\n

\n

\n The Pet Store API contains the /pets and /pets/{petId} resources. By making a GET request to /pets you can retrieve a list of Pets in your API. If you are looking for a specific pet, for example the pet with ID 1, you can make a GET request to /pets/1.\n

\n

\n You can use a REST client such as Postman to test the POST methods in your API to create a new pet. Use the sample body below to send the POST request:\n

\n
\n{\n    \"type\" : \"cat\",\n    \"price\" : 123.11\n}\n        
\n \n" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "type", "in": "query", + "name": "type", "required": false, "type": "string" }, { - "name": "page", "in": "query", + "name": "page", "required": false, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.querystring.page": "method.request.querystring.page", + "integration.request.querystring.type": "method.request.querystring.type" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "GET", - "requestParameters": { - "integration.request.querystring.page": "method.request.querystring.page", - "integration.request.querystring.type": "method.request.querystring.type" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,GET,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets/{petId}": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "petId", "in": "path", + "name": "petId", "required": true, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.path.petId": "method.request.path.petId" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}", - "httpMethod": "GET", - "requestParameters": { - "integration.request.path.petId": "method.request.path.petId" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}" } }, "options": { @@ -297,44 +298,43 @@ "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { - "Access-Control-Allow-Origin": { + "Access-Control-Allow-Headers": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, - "Access-Control-Allow-Headers": { + "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } } } }, - "definitions": { - "Empty": { - "type": "object" - } - } + "schemes": [ + "https" + ], + "swagger": "2.0" } diff --git a/integration/resources/code/swagger2.json b/integration/resources/code/swagger2.json index 7db53a271b..f048891201 100644 --- a/integration/resources/code/swagger2.json +++ b/integration/resources/code/swagger2.json @@ -1,12 +1,13 @@ { - "swagger": "2.0", + "definitions": { + "Empty": { + "type": "object" + } + }, "info": { - "title": "PetStore", - "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints" + "description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints", + "title": "PetStore" }, - "schemes": [ - "https" - ], "paths": { "/": { "get": { @@ -27,139 +28,139 @@ } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Content-Type": "'text/html'" }, "responseTemplates": { "text/html": "\n \n \n \n \n

Welcome to your Pet Store API

\n

\n You have succesfully deployed your first API. You are seeing this HTML page because the GET method to the root resource of your API returns this content as a Mock integration.\n

\n

\n The Pet Store API contains the /pets and /pets/{petId} resources. By making a GET request to /pets you can retrieve a list of Pets in your API. If you are looking for a specific pet, for example the pet with ID 1, you can make a GET request to /pets/1.\n

\n

\n You can use a REST client such as Postman to test the POST methods in your API to create a new pet. Use the sample body below to send the POST request:\n

\n
\n{\n    \"type\" : \"cat\",\n    \"price\" : 123.11\n}\n        
\n \n" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } }, - "post": { + "options": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { + "Access-Control-Allow-Headers": { + "type": "string" + }, + "Access-Control-Allow-Methods": { + "type": "string" + }, "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { + "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets", - "httpMethod": "POST", - "type": "http" + "type": "mock" } }, - "options": { - "consumes": [ - "application/json" - ], + "post": { "produces": [ "application/json" ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" - }, - "Access-Control-Allow-Methods": { - "type": "string" - }, - "Access-Control-Allow-Headers": { - "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "POST", "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'POST,OPTIONS'", - "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, - "type": "mock" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets" } } }, "/pets/{petId}": { "get": { - "produces": [ - "application/json" - ], "parameters": [ { - "name": "petId", "in": "path", + "name": "petId", "required": true, "type": "string" } ], + "produces": [ + "application/json" + ], "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "httpMethod": "GET", + "requestParameters": { + "integration.request.path.petId": "method.request.path.petId" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}", - "httpMethod": "GET", - "requestParameters": { - "integration.request.path.petId": "method.request.path.petId" - }, - "type": "http" + "type": "http", + "uri": "http://petstore-demo-endpoint.execute-api.com/petstore/pets/{petId}" } }, "options": { @@ -172,44 +173,43 @@ "responses": { "200": { "description": "200 response", - "schema": { - "$ref": "#/definitions/Empty" - }, "headers": { - "Access-Control-Allow-Origin": { + "Access-Control-Allow-Headers": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, - "Access-Control-Allow-Headers": { + "Access-Control-Allow-Origin": { "type": "string" } + }, + "schema": { + "$ref": "#/definitions/Empty" } } }, "x-amazon-apigateway-integration": { + "requestTemplates": { + "application/json": "{\"statusCode\": 200}" + }, "responses": { "default": { - "statusCode": "200", "responseParameters": { - "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Headers": "'Content-Type,X-Amz-Date,Authorization,X-Api-Key'", + "method.response.header.Access-Control-Allow-Methods": "'GET,OPTIONS'", "method.response.header.Access-Control-Allow-Origin": "'*'" - } + }, + "statusCode": "200" } }, - "requestTemplates": { - "application/json": "{\"statusCode\": 200}" - }, "type": "mock" } } } }, - "definitions": { - "Empty": { - "type": "object" - } - } + "schemes": [ + "https" + ], + "swagger": "2.0" } diff --git a/integration/resources/code/template.yaml b/integration/resources/code/template.yaml index 1949e8ba61..e89e51a3a1 100644 --- a/integration/resources/code/template.yaml +++ b/integration/resources/code/template.yaml @@ -1,8 +1,8 @@ AWSTemplateFormatVersion: '2010-09-09' -Transform: 'AWS::Serverless-2016-10-31' +Transform: AWS::Serverless-2016-10-31 Resources: MyTable: - Type: 'AWS::Serverless::SimpleTable' + Type: AWS::Serverless::SimpleTable Outputs: TableName: - Value: !Ref MyTable \ No newline at end of file + Value: !Ref MyTable diff --git a/integration/resources/expected/combination/all_policy_templates.json b/integration/resources/expected/combination/all_policy_templates.json index c6006004b2..93ed459332 100644 --- a/integration/resources/expected/combination/all_policy_templates.json +++ b/integration/resources/expected/combination/all_policy_templates.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction2", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunction2Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction3", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunction3Role", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction2", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunction2Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction3", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunction3Role", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizer_apikey.json b/integration/resources/expected/combination/api_with_authorizer_apikey.json index ecf2786988..ed67d8da70 100644 --- a/integration/resources/expected/combination/api_with_authorizer_apikey.json +++ b/integration/resources/expected/combination/api_with_authorizer_apikey.json @@ -1,15 +1,54 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFirstApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"MyUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFirstApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "MyUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json b/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json index 48e1752b6a..06753ea5f7 100644 --- a/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json +++ b/integration/resources/expected/combination/api_with_authorizers_invokefunction_set_none.json @@ -1,15 +1,54 @@ [ - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentials", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentialsDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiWithAwsIamAuthNoCallerCredentialsProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRole", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRoleAPI3PermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionDefaultInvokeRoleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRole", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRoleAPI3PermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNONEInvokeRoleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuth", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthMyApiWithAwsIamAuthPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthMyApiWithNoAuthPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionWithAwsIamAuthRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentials", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentialsDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiWithAwsIamAuthNoCallerCredentialsProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRole", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRoleAPI3PermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionDefaultInvokeRoleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRole", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRoleAPI3PermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNONEInvokeRoleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuth", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthMyApiWithAwsIamAuthPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthMyApiWithNoAuthPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionWithAwsIamAuthRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_max.json b/integration/resources/expected/combination/api_with_authorizers_max.json index 44effbbf17..e95a803ec6 100644 --- a/integration/resources/expected/combination/api_with_authorizers_max.json +++ b/integration/resources/expected/combination/api_with_authorizers_max.json @@ -1,21 +1,78 @@ [ - { "LogicalResourceId":"LambdaAuthInvokeRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolTwo", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "LambdaAuthInvokeRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolTwo", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_max_openapi.json b/integration/resources/expected/combination/api_with_authorizers_max_openapi.json index 7b3dee7d39..06469c03c3 100644 --- a/integration/resources/expected/combination/api_with_authorizers_max_openapi.json +++ b/integration/resources/expected/combination/api_with_authorizers_max_openapi.json @@ -1,25 +1,94 @@ [ - { "LogicalResourceId":"LambdaAuthInvokeRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolTwo", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionApiKeyPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"MyFirstApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" } -] \ No newline at end of file + { + "LogicalResourceId": "LambdaAuthInvokeRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolTwo", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionApiKeyPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "MyFirstApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + } +] diff --git a/integration/resources/expected/combination/api_with_authorizers_min.json b/integration/resources/expected/combination/api_with_authorizers_min.json index 85cbb5b714..4891a326e0 100644 --- a/integration/resources/expected/combination/api_with_authorizers_min.json +++ b/integration/resources/expected/combination/api_with_authorizers_min.json @@ -1,18 +1,66 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyLambdaRequestAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiMyLambdaTokenAuthAuthorizerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"MyCognitoUserPoolClient", "ResourceType":"AWS::Cognito::UserPoolClient" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionCognitoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaRequestPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionLambdaTokenPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaAuthFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaAuthFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyLambdaRequestAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiMyLambdaTokenAuthAuthorizerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "MyCognitoUserPoolClient", + "ResourceType": "AWS::Cognito::UserPoolClient" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionCognitoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaRequestPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionLambdaTokenPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaAuthFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaAuthFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types.json b/integration/resources/expected/combination/api_with_binary_media_types.json index bd48f03b99..3d879f645f 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types.json +++ b/integration/resources/expected/combination/api_with_binary_media_types.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json index bd48f03b99..3d879f645f 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json +++ b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json index 55ec077b3d..a3019c030f 100644 --- a/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json +++ b/integration/resources/expected/combination/api_with_binary_media_types_with_definition_body_openapi.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambda", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambda", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_cors.json b/integration/resources/expected/combination/api_with_cors.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors.json +++ b/integration/resources/expected/combination/api_with_cors.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_headers.json b/integration/resources/expected/combination/api_with_cors_only_headers.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors_only_headers.json +++ b/integration/resources/expected/combination/api_with_cors_only_headers.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_max_age.json b/integration/resources/expected/combination/api_with_cors_only_max_age.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors_only_max_age.json +++ b/integration/resources/expected/combination/api_with_cors_only_max_age.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_only_methods.json b/integration/resources/expected/combination/api_with_cors_only_methods.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors_only_methods.json +++ b/integration/resources/expected/combination/api_with_cors_only_methods.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_openapi.json b/integration/resources/expected/combination/api_with_cors_openapi.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors_openapi.json +++ b/integration/resources/expected/combination/api_with_cors_openapi.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_cors_shorthand.json b/integration/resources/expected/combination/api_with_cors_shorthand.json index 79a2fbc3a5..c96cc3b304 100644 --- a/integration/resources/expected/combination/api_with_cors_shorthand.json +++ b/integration/resources/expected/combination/api_with_cors_shorthand.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionApiOnePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionApiTwoPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiOnePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiTwoPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_edge.json b/integration/resources/expected/combination/api_with_custom_domains_edge.json index d8dd5918f9..ff3d53996a 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_edge.json +++ b/integration/resources/expected/combination/api_with_custom_domains_edge.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"RecordSetGroup1b7eeb359e", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ApiGatewayDomainName1101a94567", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"MyFunctionFetchPermissionProd", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "RecordSetGroup1b7eeb359e", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ApiGatewayDomainName1101a94567", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "MyFunctionFetchPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json index 83afc8d73f..87c82b557f 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_edge_feature_toggle.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"RecordSetGroupc911be5759", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ApiGatewayDomainName299fac327d", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"MyFunctionFetchPermissionProd", "ResourceType":"AWS::Lambda::Permission" } - ] \ No newline at end of file + { + "LogicalResourceId": "RecordSetGroupc911be5759", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ApiGatewayDomainName299fac327d", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "MyFunctionFetchPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional.json b/integration/resources/expected/combination/api_with_custom_domains_regional.json index b3d611ea3a..eec0647ef5 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainName7898169271", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainName7898169271", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json index d83cd1c29d..751a57f174 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_feature_toggle.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainName98c928338d", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainName98c928338d", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json index 7b9e374718..fec74ff5e2 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainNamec6418178e6", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainNamec6418178e6", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json index 815a864c09..db2d7a0f56 100644 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json +++ b/integration/resources/expected/combination/api_with_custom_domains_regional_ownership_verification_feature_toggle.json @@ -1,13 +1,46 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApipostBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApigetBasePathMapping", "ResourceType":"AWS::ApiGateway::BasePathMapping" }, - { "LogicalResourceId":"ApiGatewayDomainNamef593820b0b", "ResourceType":"AWS::ApiGateway::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApipostBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApigetBasePathMapping", + "ResourceType": "AWS::ApiGateway::BasePathMapping" + }, + { + "LogicalResourceId": "ApiGatewayDomainNamef593820b0b", + "ResourceType": "AWS::ApiGateway::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json index 3dd2412b9a..8a83e221c9 100644 --- a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json +++ b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json index 3dd2412b9a..8a83e221c9 100644 --- a/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json +++ b/integration/resources/expected/combination/api_with_disable_execute_api_endpoint_openapi_3.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/combination/api_with_endpoint_configuration.json b/integration/resources/expected/combination/api_with_endpoint_configuration.json index bd48f03b99..3d879f645f 100644 --- a/integration/resources/expected/combination/api_with_endpoint_configuration.json +++ b/integration/resources/expected/combination/api_with_endpoint_configuration.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json b/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json index bd48f03b99..3d879f645f 100644 --- a/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json +++ b/integration/resources/expected/combination/api_with_endpoint_configuration_dict.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_fail_on_warnings.json b/integration/resources/expected/combination/api_with_fail_on_warnings.json index b1f81c7a01..8a83e221c9 100644 --- a/integration/resources/expected/combination/api_with_fail_on_warnings.json +++ b/integration/resources/expected/combination/api_with_fail_on_warnings.json @@ -1,8 +1,26 @@ [ - {"LogicalResourceId": "RestApiGateway", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "RestApiGatewayDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "RestApiGatewayProdStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "RestApiFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "RestApiFunctionIamPermissionProd", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "RestApiFunctionRole", "ResourceType": "AWS::IAM::Role"} -] \ No newline at end of file + { + "LogicalResourceId": "RestApiGateway", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "RestApiGatewayDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "RestApiGatewayProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "RestApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "RestApiFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "RestApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_gateway_responses.json b/integration/resources/expected/combination/api_with_gateway_responses.json index 03b8a01d59..0a91b2a4d7 100644 --- a/integration/resources/expected/combination/api_with_gateway_responses.json +++ b/integration/resources/expected/combination/api_with_gateway_responses.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionIamPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionIamPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_method_settings.json b/integration/resources/expected/combination/api_with_method_settings.json index bd48f03b99..3d879f645f 100644 --- a/integration/resources/expected/combination/api_with_method_settings.json +++ b/integration/resources/expected/combination/api_with_method_settings.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_request_models.json b/integration/resources/expected/combination/api_with_request_models.json index 6bb28b0df7..9a721ff190 100644 --- a/integration/resources/expected/combination/api_with_request_models.json +++ b/integration/resources/expected/combination/api_with_request_models.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_request_models_openapi.json b/integration/resources/expected/combination/api_with_request_models_openapi.json index 6bb28b0df7..9a721ff190 100644 --- a/integration/resources/expected/combination/api_with_request_models_openapi.json +++ b/integration/resources/expected/combination/api_with_request_models_openapi.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionNonePermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionNonePermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_request_parameters_openapi.json b/integration/resources/expected/combination/api_with_request_parameters_openapi.json index 7787fc1a18..6c6ed74a24 100644 --- a/integration/resources/expected/combination/api_with_request_parameters_openapi.json +++ b/integration/resources/expected/combination/api_with_request_parameters_openapi.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ApiParameterFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"ApiParameterFunctionGetHtmlPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ApiParameterFunctionAnotherGetHtmlPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ApiParameterFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ApiParameterFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "ApiParameterFunctionGetHtmlPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ApiParameterFunctionAnotherGetHtmlPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ApiParameterFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_policies.json b/integration/resources/expected/combination/api_with_resource_policies.json index a92cd0eb49..e574e84658 100644 --- a/integration/resources/expected/combination/api_with_resource_policies.json +++ b/integration/resources/expected/combination/api_with_resource_policies.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionAnotherApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionAnotherApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_policies_aws_account.json b/integration/resources/expected/combination/api_with_resource_policies_aws_account.json index e99ee073a9..3d9c576441 100644 --- a/integration/resources/expected/combination/api_with_resource_policies_aws_account.json +++ b/integration/resources/expected/combination/api_with_resource_policies_aws_account.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/api_with_resource_refs.json b/integration/resources/expected/combination/api_with_resource_refs.json index 4ff8679c28..30b334c234 100644 --- a/integration/resources/expected/combination/api_with_resource_refs.json +++ b/integration/resources/expected/combination/api_with_resource_refs.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/api_with_usage_plan.json b/integration/resources/expected/combination/api_with_usage_plan.json index a04e57274e..bcf9ee1cff 100644 --- a/integration/resources/expected/combination/api_with_usage_plan.json +++ b/integration/resources/expected/combination/api_with_usage_plan.json @@ -1,20 +1,74 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApiUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"MyApiUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"MyApiApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" }, - { "LogicalResourceId":"MyApi2", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi2Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi2ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApi3", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi3Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi3ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyApi4", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApi4Deployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi4ProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessUsagePlan", "ResourceType":"AWS::ApiGateway::UsagePlan" }, - { "LogicalResourceId":"ServerlessUsagePlanKey", "ResourceType":"AWS::ApiGateway::UsagePlanKey" }, - { "LogicalResourceId":"ServerlessApiKey", "ResourceType":"AWS::ApiGateway::ApiKey" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApiUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "MyApiUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "MyApiApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + }, + { + "LogicalResourceId": "MyApi2", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi2Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi2ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApi3", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi3Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi3ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyApi4", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApi4Deployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi4ProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessUsagePlan", + "ResourceType": "AWS::ApiGateway::UsagePlan" + }, + { + "LogicalResourceId": "ServerlessUsagePlanKey", + "ResourceType": "AWS::ApiGateway::UsagePlanKey" + }, + { + "LogicalResourceId": "ServerlessApiKey", + "ResourceType": "AWS::ApiGateway::ApiKey" + } +] diff --git a/integration/resources/expected/combination/connector_bucket_to_function_write.json b/integration/resources/expected/combination/connector_bucket_to_function_write.json index c710e10f6b..cbc95069b9 100644 --- a/integration/resources/expected/combination/connector_bucket_to_function_write.json +++ b/integration/resources/expected/combination/connector_bucket_to_function_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotTestedPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json b/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json index 9aa4cb7437..331e760f5d 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_eb_custom_write.json @@ -35,4 +35,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json b/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json index 9aa4cb7437..331e760f5d 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_eb_default_write.json @@ -35,4 +35,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json b/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json index 227d117c35..d723187efe 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_lambda_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "VerificationQueue", "ResourceType": "AWS::SQS::Queue" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json b/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json index b523ff64d5..03868525ee 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sfn_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "StateMachineRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sns_write.json b/integration/resources/expected/combination/connector_event_rule_to_sns_write.json index ec8c2c15df..048263a941 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sns_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sns_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotBeingTestedQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json b/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json index 15dd9518fe..502a4e49cb 100644 --- a/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json +++ b/integration/resources/expected/combination/connector_event_rule_to_sqs_write.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_bucket_read.json b/integration/resources/expected/combination/connector_function_to_bucket_read.json index 92e23cfdbb..a02bc5b6aa 100644 --- a/integration/resources/expected/combination/connector_function_to_bucket_read.json +++ b/integration/resources/expected/combination/connector_function_to_bucket_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_bucket_write.json b/integration/resources/expected/combination/connector_function_to_bucket_write.json index 92e23cfdbb..a02bc5b6aa 100644 --- a/integration/resources/expected/combination/connector_function_to_bucket_write.json +++ b/integration/resources/expected/combination/connector_function_to_bucket_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_eventbus_write.json b/integration/resources/expected/combination/connector_function_to_eventbus_write.json index 3f2c3bba95..8f46ee98b7 100644 --- a/integration/resources/expected/combination/connector_function_to_eventbus_write.json +++ b/integration/resources/expected/combination/connector_function_to_eventbus_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_function.json b/integration/resources/expected/combination/connector_function_to_function.json index c7299e46fd..927a18df25 100644 --- a/integration/resources/expected/combination/connector_function_to_function.json +++ b/integration/resources/expected/combination/connector_function_to_function.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_queue_read.json b/integration/resources/expected/combination/connector_function_to_queue_read.json index 7bb4b7c428..d9dd3466ea 100644 --- a/integration/resources/expected/combination/connector_function_to_queue_read.json +++ b/integration/resources/expected/combination/connector_function_to_queue_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_queue_write.json b/integration/resources/expected/combination/connector_function_to_queue_write.json index 7bb4b7c428..d9dd3466ea 100644 --- a/integration/resources/expected/combination/connector_function_to_queue_write.json +++ b/integration/resources/expected/combination/connector_function_to_queue_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_sfn_read.json b/integration/resources/expected/combination/connector_function_to_sfn_read.json index 347cd24989..3dfa6b0b27 100644 --- a/integration/resources/expected/combination/connector_function_to_sfn_read.json +++ b/integration/resources/expected/combination/connector_function_to_sfn_read.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_sfn_write.json b/integration/resources/expected/combination/connector_function_to_sfn_write.json index 347cd24989..3dfa6b0b27 100644 --- a/integration/resources/expected/combination/connector_function_to_sfn_write.json +++ b/integration/resources/expected/combination/connector_function_to_sfn_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_table_read.json b/integration/resources/expected/combination/connector_function_to_table_read.json index acd04bd85e..4dabd2c5eb 100644 --- a/integration/resources/expected/combination/connector_function_to_table_read.json +++ b/integration/resources/expected/combination/connector_function_to_table_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyReadConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_table_write.json b/integration/resources/expected/combination/connector_function_to_table_write.json index c2fc1b29c8..293521ea58 100644 --- a/integration/resources/expected/combination/connector_function_to_table_write.json +++ b/integration/resources/expected/combination/connector_function_to_table_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyWriteConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_function_to_topic_write.json b/integration/resources/expected/combination/connector_function_to_topic_write.json index 773f7f7211..14ece98736 100644 --- a/integration/resources/expected/combination/connector_function_to_topic_write.json +++ b/integration/resources/expected/combination/connector_function_to_topic_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_httpapi_to_function.json b/integration/resources/expected/combination/connector_httpapi_to_function.json index 26fd37b3a3..89841392e6 100644 --- a/integration/resources/expected/combination/connector_httpapi_to_function.json +++ b/integration/resources/expected/combination/connector_httpapi_to_function.json @@ -35,4 +35,4 @@ "LogicalResourceId": "HttpApi", "ResourceType": "AWS::ApiGatewayV2::Api" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_restapi_to_function.json b/integration/resources/expected/combination/connector_restapi_to_function.json index 6f5140962b..78de28363f 100644 --- a/integration/resources/expected/combination/connector_restapi_to_function.json +++ b/integration/resources/expected/combination/connector_restapi_to_function.json @@ -39,4 +39,4 @@ "LogicalResourceId": "RestApi", "ResourceType": "AWS::ApiGateway::RestApi" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_bucket_read.json b/integration/resources/expected/combination/connector_sfn_to_bucket_read.json index 166b303b31..9d07739dcf 100644 --- a/integration/resources/expected/combination/connector_sfn_to_bucket_read.json +++ b/integration/resources/expected/combination/connector_sfn_to_bucket_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_bucket_write.json b/integration/resources/expected/combination/connector_sfn_to_bucket_write.json index 166b303b31..9d07739dcf 100644 --- a/integration/resources/expected/combination/connector_sfn_to_bucket_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_bucket_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json b/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json index eec04c6a84..c3a6694917 100644 --- a/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_eb_custom_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json b/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json index ced2c2f08e..228eab25fe 100644 --- a/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_eb_default_write.json @@ -11,4 +11,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_function_write.json b/integration/resources/expected/combination/connector_sfn_to_function_write.json index f77efc6551..6ba1b3b231 100644 --- a/integration/resources/expected/combination/connector_sfn_to_function_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_function_write.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sfn_async.json b/integration/resources/expected/combination/connector_sfn_to_sfn_async.json index c041658a73..b1ddd33879 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sfn_async.json +++ b/integration/resources/expected/combination/connector_sfn_to_sfn_async.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json b/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json index c041658a73..b1ddd33879 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json +++ b/integration/resources/expected/combination/connector_sfn_to_sfn_sync.json @@ -19,4 +19,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sns_write.json b/integration/resources/expected/combination/connector_sfn_to_sns_write.json index 0696e0d895..b5856feb35 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sns_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_sns_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_sqs_write.json b/integration/resources/expected/combination/connector_sfn_to_sqs_write.json index caf304a390..1da63e9743 100644 --- a/integration/resources/expected/combination/connector_sfn_to_sqs_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_sqs_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_table_read.json b/integration/resources/expected/combination/connector_sfn_to_table_read.json index 3286c575a1..60ff63c83f 100644 --- a/integration/resources/expected/combination/connector_sfn_to_table_read.json +++ b/integration/resources/expected/combination/connector_sfn_to_table_read.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sfn_to_table_write.json b/integration/resources/expected/combination/connector_sfn_to_table_write.json index 3286c575a1..60ff63c83f 100644 --- a/integration/resources/expected/combination/connector_sfn_to_table_write.json +++ b/integration/resources/expected/combination/connector_sfn_to_table_write.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sns_to_function_write.json b/integration/resources/expected/combination/connector_sns_to_function_write.json index 6292b7a9ee..2c53623781 100644 --- a/integration/resources/expected/combination/connector_sns_to_function_write.json +++ b/integration/resources/expected/combination/connector_sns_to_function_write.json @@ -31,4 +31,4 @@ "LogicalResourceId": "ConnectorNotTestedPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_sqs_to_function.json b/integration/resources/expected/combination/connector_sqs_to_function.json index ffe320b5f7..714d4bf96c 100644 --- a/integration/resources/expected/combination/connector_sqs_to_function.json +++ b/integration/resources/expected/combination/connector_sqs_to_function.json @@ -31,4 +31,4 @@ "LogicalResourceId": "SQSEventSourceMapping", "ResourceType": "AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_table_to_function_read.json b/integration/resources/expected/combination/connector_table_to_function_read.json index 97c4bf221b..6c18147ca1 100644 --- a/integration/resources/expected/combination/connector_table_to_function_read.json +++ b/integration/resources/expected/combination/connector_table_to_function_read.json @@ -35,4 +35,4 @@ "LogicalResourceId": "ConnectorPolicy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/connector_topic_to_queue_write.json b/integration/resources/expected/combination/connector_topic_to_queue_write.json index df5d7545b4..ae426670cb 100644 --- a/integration/resources/expected/combination/connector_topic_to_queue_write.json +++ b/integration/resources/expected/combination/connector_topic_to_queue_write.json @@ -27,4 +27,4 @@ "LogicalResourceId": "Connector3Policy", "ResourceType": "AWS::IAM::ManagedPolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/depends_on.json b/integration/resources/expected/combination/depends_on.json index 7c4a4a0340..f927bcd229 100644 --- a/integration/resources/expected/combination/depends_on.json +++ b/integration/resources/expected/combination/depends_on.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"LambdaRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"LambdaRolePolicy", "ResourceType":"AWS::IAM::Policy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "LambdaRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "LambdaRolePolicy", + "ResourceType": "AWS::IAM::Policy" + } +] diff --git a/integration/resources/expected/combination/function_with_alias.json b/integration/resources/expected/combination/function_with_alias.json index c87908d154..af92023eb9 100644 --- a/integration/resources/expected/combination/function_with_alias.json +++ b/integration/resources/expected/combination/function_with_alias.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_and_event_sources.json b/integration/resources/expected/combination/function_with_alias_and_event_sources.json index 1789380262..beb13ad466 100644 --- a/integration/resources/expected/combination/function_with_alias_and_event_sources.json +++ b/integration/resources/expected/combination/function_with_alias_and_event_sources.json @@ -1,27 +1,102 @@ [ - { "LogicalResourceId":"MyAwesomeFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAwesomeFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAwesomeFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyAwesomeFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyAwesomeFunctionDDBStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyAwesomeFunctionExplicitApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"Stream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyAwesomeFunctionS3TriggerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopic", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyTable", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopicPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Notifications", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyAwesomeFunctionImplicitApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "MyAwesomeFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAwesomeFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAwesomeFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyAwesomeFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyAwesomeFunctionDDBStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyAwesomeFunctionExplicitApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "Stream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyAwesomeFunctionS3TriggerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopic", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyTable", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopicPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Notifications", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyAwesomeFunctionImplicitApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_globals.json b/integration/resources/expected/combination/function_with_alias_globals.json index a8de059ba7..64e5fdacb6 100644 --- a/integration/resources/expected/combination/function_with_alias_globals.json +++ b/integration/resources/expected/combination/function_with_alias_globals.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasprod", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"FunctionWithOverride", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionWithOverrideRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionWithOverrideAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"FunctionWithOverrideVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasprod", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "FunctionWithOverride", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionWithOverrideRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionWithOverrideAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "FunctionWithOverrideVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_alias_intrinsics.json b/integration/resources/expected/combination/function_with_alias_intrinsics.json index c87908d154..af92023eb9 100644 --- a/integration/resources/expected/combination/function_with_alias_intrinsics.json +++ b/integration/resources/expected/combination/function_with_alias_intrinsics.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/combination/function_with_all_event_types.json b/integration/resources/expected/combination/function_with_all_event_types.json index fc771413bf..c4bcca3e54 100644 --- a/integration/resources/expected/combination/function_with_all_event_types.json +++ b/integration/resources/expected/combination/function_with_all_event_types.json @@ -1,31 +1,118 @@ [ - { "LogicalResourceId":"FunctionOne", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionOneRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionOneImageBucketPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" }, - { "LogicalResourceId":"Notifications", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"CloudWatchLambdaLogsGroup", "ResourceType":"AWS::Logs::LogGroup" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyDynamoDB", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"MyAwesomeFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAwesomeFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAwesomeFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyAwesomeFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyAwesomeFunctionCWSchedulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionIoTRule", "ResourceType":"AWS::IoT::TopicRule" }, - { "LogicalResourceId":"MyAwesomeFunctionIoTRulePermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyAwesomeFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionS3TriggerPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopic", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"MyAwesomeFunctionNotificationTopicPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyAwesomeFunctionCWLog", "ResourceType":"AWS::Logs::SubscriptionFilter" }, - { "LogicalResourceId":"MyAwesomeFunctionCWLogPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyAwesomeFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyAwesomeFunctionDDBStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "FunctionOne", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionOneRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionOneImageBucketPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + }, + { + "LogicalResourceId": "Notifications", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "CloudWatchLambdaLogsGroup", + "ResourceType": "AWS::Logs::LogGroup" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyDynamoDB", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "MyAwesomeFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAwesomeFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAwesomeFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyAwesomeFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWSchedulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionIoTRule", + "ResourceType": "AWS::IoT::TopicRule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionIoTRulePermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionS3TriggerPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopic", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "MyAwesomeFunctionNotificationTopicPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWLog", + "ResourceType": "AWS::Logs::SubscriptionFilter" + }, + { + "LogicalResourceId": "MyAwesomeFunctionCWLogPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyAwesomeFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyAwesomeFunctionDDBStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_all_event_types_condition_false.json b/integration/resources/expected/combination/function_with_all_event_types_condition_false.json index 7fd7c63126..071ebf8876 100644 --- a/integration/resources/expected/combination/function_with_all_event_types_condition_false.json +++ b/integration/resources/expected/combination/function_with_all_event_types_condition_false.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"FunctionOne", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"FunctionOneRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionOneImageBucketPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"Images", "ResourceType":"AWS::S3::Bucket" } -] \ No newline at end of file + { + "LogicalResourceId": "FunctionOne", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "FunctionOneRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionOneImageBucketPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "Images", + "ResourceType": "AWS::S3::Bucket" + } +] diff --git a/integration/resources/expected/combination/function_with_api.json b/integration/resources/expected/combination/function_with_api.json index 8fb2e128c1..b0ac39a303 100644 --- a/integration/resources/expected/combination/function_with_api.json +++ b/integration/resources/expected/combination/function_with_api.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionDev", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionDev", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_application.json b/integration/resources/expected/combination/function_with_application.json index c90dda99eb..bad7fc3ae3 100644 --- a/integration/resources/expected/combination/function_with_application.json +++ b/integration/resources/expected/combination/function_with_application.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" }, - { "LogicalResourceId":"MyLambdaFunctionWithApplication", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionWithApplicationRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithApplication", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithApplicationRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_cloudwatch_log.json b/integration/resources/expected/combination/function_with_cloudwatch_log.json index 96648fa985..27654f893d 100644 --- a/integration/resources/expected/combination/function_with_cloudwatch_log.json +++ b/integration/resources/expected/combination/function_with_cloudwatch_log.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionLogProcessorPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"CloudWatchLambdaLogsGroup", "ResourceType":"AWS::Logs::LogGroup" }, - { "LogicalResourceId":"MyLambdaFunctionLogProcessor", "ResourceType":"AWS::Logs::SubscriptionFilter" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionLogProcessorPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "CloudWatchLambdaLogsGroup", + "ResourceType": "AWS::Logs::LogGroup" + }, + { + "LogicalResourceId": "MyLambdaFunctionLogProcessor", + "ResourceType": "AWS::Logs::SubscriptionFilter" + } +] diff --git a/integration/resources/expected/combination/function_with_custom_code_deploy.json b/integration/resources/expected/combination/function_with_custom_code_deploy.json index 8b2a296918..2fb3d043d6 100644 --- a/integration/resources/expected/combination/function_with_custom_code_deploy.json +++ b/integration/resources/expected/combination/function_with_custom_code_deploy.json @@ -1,10 +1,34 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"CustomDeploymentConfig", "ResourceType":"AWS::CodeDeploy::DeploymentConfig" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "CustomDeploymentConfig", + "ResourceType": "AWS::CodeDeploy::DeploymentConfig" + } +] diff --git a/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json b/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json index 35a00939c0..5915c182a3 100644 --- a/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/function_with_cwe_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_cwe_dlq_generated.json b/integration/resources/expected/combination/function_with_cwe_dlq_generated.json index bc55117726..382d98e239 100644 --- a/integration/resources/expected/combination/function_with_cwe_dlq_generated.json +++ b/integration/resources/expected/combination/function_with_cwe_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDlq", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionCWEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDlq", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionCWEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json b/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json index d5a1611727..b7c59d3fce 100644 --- a/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json +++ b/integration/resources/expected/combination/function_with_deployment_alarms_and_hooks.json @@ -1,16 +1,58 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"PreTrafficFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PreTrafficFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PostTrafficFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PostTrafficFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"FunctionErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" }, - { "LogicalResourceId":"AliasErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" }, - { "LogicalResourceId":"NewVersionErrorsAlarm", "ResourceType":"AWS::CloudWatch::Alarm" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "PreTrafficFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PreTrafficFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PostTrafficFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PostTrafficFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "FunctionErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + }, + { + "LogicalResourceId": "AliasErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + }, + { + "LogicalResourceId": "NewVersionErrorsAlarm", + "ResourceType": "AWS::CloudWatch::Alarm" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_basic.json b/integration/resources/expected/combination/function_with_deployment_basic.json index 4aa5ea974a..76e6c44846 100644 --- a/integration/resources/expected/combination/function_with_deployment_basic.json +++ b/integration/resources/expected/combination/function_with_deployment_basic.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json b/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json index 2b061ccf41..20cce17a14 100644 --- a/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json +++ b/integration/resources/expected/combination/function_with_deployment_default_role_managed_policy.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"CodeDeployServiceRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "CodeDeployServiceRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_disabled.json b/integration/resources/expected/combination/function_with_deployment_disabled.json index 77ca0a93c0..9a3f230796 100644 --- a/integration/resources/expected/combination/function_with_deployment_disabled.json +++ b/integration/resources/expected/combination/function_with_deployment_disabled.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_deployment_globals.json b/integration/resources/expected/combination/function_with_deployment_globals.json index 4aa5ea974a..76e6c44846 100644 --- a/integration/resources/expected/combination/function_with_deployment_globals.json +++ b/integration/resources/expected/combination/function_with_deployment_globals.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"ServerlessDeploymentApplication", "ResourceType":"AWS::CodeDeploy::Application" }, - { "LogicalResourceId":"MyLambdaFunctionDeploymentGroup", "ResourceType":"AWS::CodeDeploy::DeploymentGroup" }, - { "LogicalResourceId":"DeploymentRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "ServerlessDeploymentApplication", + "ResourceType": "AWS::CodeDeploy::Application" + }, + { + "LogicalResourceId": "MyLambdaFunctionDeploymentGroup", + "ResourceType": "AWS::CodeDeploy::DeploymentGroup" + }, + { + "LogicalResourceId": "DeploymentRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_dynamodb.json b/integration/resources/expected/combination/function_with_dynamodb.json index b76de6e5ff..c0fcd935c6 100644 --- a/integration/resources/expected/combination/function_with_dynamodb.json +++ b/integration/resources/expected/combination/function_with_dynamodb.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyTable", "ResourceType":"AWS::DynamoDB::Table" }, - { "LogicalResourceId":"MyLambdaFunctionDdbStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTable", + "ResourceType": "AWS::DynamoDB::Table" + }, + { + "LogicalResourceId": "MyLambdaFunctionDdbStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_file_system_config.json b/integration/resources/expected/combination/function_with_file_system_config.json index 6d5b273af3..9ce62bd952 100644 --- a/integration/resources/expected/combination/function_with_file_system_config.json +++ b/integration/resources/expected/combination/function_with_file_system_config.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"EfsFileSystem", "ResourceType":"AWS::EFS::FileSystem" }, - { "LogicalResourceId":"MountTarget", "ResourceType":"AWS::EFS::MountTarget" }, - { "LogicalResourceId":"AccessPoint", "ResourceType":"AWS::EFS::AccessPoint" }, - { "LogicalResourceId":"LambdaFunctionWithEfs", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MySecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"LambdaFunctionWithEfsRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "EfsFileSystem", + "ResourceType": "AWS::EFS::FileSystem" + }, + { + "LogicalResourceId": "MountTarget", + "ResourceType": "AWS::EFS::MountTarget" + }, + { + "LogicalResourceId": "AccessPoint", + "ResourceType": "AWS::EFS::AccessPoint" + }, + { + "LogicalResourceId": "LambdaFunctionWithEfs", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MySecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "LambdaFunctionWithEfsRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_http_api.json b/integration/resources/expected/combination/function_with_http_api.json index 7f6ef29263..0c7a8e27d7 100644 --- a/integration/resources/expected/combination/function_with_http_api.json +++ b/integration/resources/expected/combination/function_with_http_api.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_http_api_default_path.json b/integration/resources/expected/combination/function_with_http_api_default_path.json index 7f6ef29263..0c7a8e27d7 100644 --- a/integration/resources/expected/combination/function_with_http_api_default_path.json +++ b/integration/resources/expected/combination/function_with_http_api_default_path.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json b/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json index 41048af23b..6f1a766d77 100644 --- a/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json +++ b/integration/resources/expected/combination/function_with_implicit_api_and_conditions.json @@ -1,14 +1,50 @@ [ - { "LogicalResourceId":"helloworld4", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld4Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld4ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"helloworld6", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld6Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld6ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"helloworld8", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"helloworld8Role", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"helloworld8ApiEventPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "helloworld4", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld4Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld4ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "helloworld6", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld6Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld6ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "helloworld8", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "helloworld8Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "helloworld8ApiEventPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_implicit_http_api.json b/integration/resources/expected/combination/function_with_implicit_http_api.json index 60b6bd9217..f7051e22b0 100644 --- a/integration/resources/expected/combination/function_with_implicit_http_api.json +++ b/integration/resources/expected/combination/function_with_implicit_http_api.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"ServerlessHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "ServerlessHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/function_with_kinesis.json b/integration/resources/expected/combination/function_with_kinesis.json index 64511cfc40..c2838a9b28 100644 --- a/integration/resources/expected/combination/function_with_kinesis.json +++ b/integration/resources/expected/combination/function_with_kinesis.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyLambdaFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyLambdaFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_kinesis_intrinsics.json b/integration/resources/expected/combination/function_with_kinesis_intrinsics.json index 64511cfc40..c2838a9b28 100644 --- a/integration/resources/expected/combination/function_with_kinesis_intrinsics.json +++ b/integration/resources/expected/combination/function_with_kinesis_intrinsics.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStream", "ResourceType":"AWS::Kinesis::Stream" }, - { "LogicalResourceId":"MyLambdaFunctionKinesisStream", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStream", + "ResourceType": "AWS::Kinesis::Stream" + }, + { + "LogicalResourceId": "MyLambdaFunctionKinesisStream", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_layer.json b/integration/resources/expected/combination/function_with_layer.json index 05716338a1..1f50aba61d 100644 --- a/integration/resources/expected/combination/function_with_layer.json +++ b/integration/resources/expected/combination/function_with_layer.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyLambdaFunctionWithLayer", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionWithLayerRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaLayer", "ResourceType":"AWS::Lambda::LayerVersion" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunctionWithLayer", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionWithLayerRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaLayer", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/combination/function_with_mq.json b/integration/resources/expected/combination/function_with_mq.json index 09f23b1699..400d440d88 100644 --- a/integration/resources/expected/combination/function_with_mq.json +++ b/integration/resources/expected/combination/function_with_mq.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaExecutionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PublicSubnetRouteTableAssociation", "ResourceType":"AWS::EC2::SubnetRouteTableAssociation" }, - { "LogicalResourceId":"MQSecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"MyMqBroker", "ResourceType":"AWS::AmazonMQ::Broker" }, - { "LogicalResourceId":"RouteTable", "ResourceType":"AWS::EC2::RouteTable" }, - { "LogicalResourceId":"MQBrokerUserSecret", "ResourceType":"AWS::SecretsManager::Secret" }, - { "LogicalResourceId":"MyLambdaFunctionMyMqEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"Route", "ResourceType":"AWS::EC2::Route" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaExecutionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PublicSubnetRouteTableAssociation", + "ResourceType": "AWS::EC2::SubnetRouteTableAssociation" + }, + { + "LogicalResourceId": "MQSecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "MyMqBroker", + "ResourceType": "AWS::AmazonMQ::Broker" + }, + { + "LogicalResourceId": "RouteTable", + "ResourceType": "AWS::EC2::RouteTable" + }, + { + "LogicalResourceId": "MQBrokerUserSecret", + "ResourceType": "AWS::SecretsManager::Secret" + }, + { + "LogicalResourceId": "MyLambdaFunctionMyMqEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "Route", + "ResourceType": "AWS::EC2::Route" + } +] diff --git a/integration/resources/expected/combination/function_with_mq_using_autogen_role.json b/integration/resources/expected/combination/function_with_mq_using_autogen_role.json index d486b2323b..3bad715007 100644 --- a/integration/resources/expected/combination/function_with_mq_using_autogen_role.json +++ b/integration/resources/expected/combination/function_with_mq_using_autogen_role.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"PublicSubnetRouteTableAssociation", "ResourceType":"AWS::EC2::SubnetRouteTableAssociation" }, - { "LogicalResourceId":"MQSecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" }, - { "LogicalResourceId":"MyMqBroker", "ResourceType":"AWS::AmazonMQ::Broker" }, - { "LogicalResourceId":"RouteTable", "ResourceType":"AWS::EC2::RouteTable" }, - { "LogicalResourceId":"MQBrokerUserSecret", "ResourceType":"AWS::SecretsManager::Secret" }, - { "LogicalResourceId":"MyLambdaFunctionMyMqEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"Route", "ResourceType":"AWS::EC2::Route" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PublicSubnetRouteTableAssociation", + "ResourceType": "AWS::EC2::SubnetRouteTableAssociation" + }, + { + "LogicalResourceId": "MQSecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + }, + { + "LogicalResourceId": "MyMqBroker", + "ResourceType": "AWS::AmazonMQ::Broker" + }, + { + "LogicalResourceId": "RouteTable", + "ResourceType": "AWS::EC2::RouteTable" + }, + { + "LogicalResourceId": "MQBrokerUserSecret", + "ResourceType": "AWS::SecretsManager::Secret" + }, + { + "LogicalResourceId": "MyLambdaFunctionMyMqEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "Route", + "ResourceType": "AWS::EC2::Route" + } +] diff --git a/integration/resources/expected/combination/function_with_msk.json b/integration/resources/expected/combination/function_with_msk.json index f39a0f7034..c0b6d8162f 100644 --- a/integration/resources/expected/combination/function_with_msk.json +++ b/integration/resources/expected/combination/function_with_msk.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyMskStreamProcessor", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaExecutionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyMskCluster", "ResourceType":"AWS::MSK::Cluster" }, - { "LogicalResourceId":"MyMskStreamProcessorMyMskEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyMskStreamProcessor", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaExecutionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyMskCluster", + "ResourceType": "AWS::MSK::Cluster" + }, + { + "LogicalResourceId": "MyMskStreamProcessorMyMskEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_msk_using_managed_policy.json b/integration/resources/expected/combination/function_with_msk_using_managed_policy.json index 04a09de04b..a17f16c863 100644 --- a/integration/resources/expected/combination/function_with_msk_using_managed_policy.json +++ b/integration/resources/expected/combination/function_with_msk_using_managed_policy.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyMskStreamProcessor", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyMskStreamProcessorRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyMskCluster", "ResourceType":"AWS::MSK::Cluster" }, - { "LogicalResourceId":"MyMskStreamProcessorMyMskEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MyMskStreamProcessor", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyMskStreamProcessorRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyMskCluster", + "ResourceType": "AWS::MSK::Cluster" + }, + { + "LogicalResourceId": "MyMskStreamProcessorMyMskEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_policy_templates.json b/integration/resources/expected/combination/function_with_policy_templates.json index 1bd08615e2..fa491013e3 100644 --- a/integration/resources/expected/combination/function_with_policy_templates.json +++ b/integration/resources/expected/combination/function_with_policy_templates.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_resource_refs.json b/integration/resources/expected/combination/function_with_resource_refs.json index d7c8494cb2..5b80464068 100644 --- a/integration/resources/expected/combination/function_with_resource_refs.json +++ b/integration/resources/expected/combination/function_with_resource_refs.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionAliasLive", "ResourceType":"AWS::Lambda::Alias" }, - { "LogicalResourceId":"MyLambdaFunctionVersion", "ResourceType":"AWS::Lambda::Version" }, - { "LogicalResourceId":"MyOtherFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyOtherFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionAliasLive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyLambdaFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyOtherFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyOtherFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/function_with_s3.json b/integration/resources/expected/combination/function_with_s3.json index 7f07143023..cc3c250cbb 100644 --- a/integration/resources/expected/combination/function_with_s3.json +++ b/integration/resources/expected/combination/function_with_s3.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionS3EventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyBucket", "ResourceType":"AWS::S3::Bucket" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionS3EventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyBucket", + "ResourceType": "AWS::S3::Bucket" + } +] diff --git a/integration/resources/expected/combination/function_with_s3_intrinsics.json b/integration/resources/expected/combination/function_with_s3_intrinsics.json index 2fdb0626a4..cc3c250cbb 100644 --- a/integration/resources/expected/combination/function_with_s3_intrinsics.json +++ b/integration/resources/expected/combination/function_with_s3_intrinsics.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyBucket", "ResourceType": "AWS::S3::Bucket" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_schedule.json b/integration/resources/expected/combination/function_with_schedule.json index 86e067c17e..b6d38b7e44 100644 --- a/integration/resources/expected/combination/function_with_schedule.json +++ b/integration/resources/expected/combination/function_with_schedule.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + } +] diff --git a/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json b/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json index e0d7734e03..c966d48089 100644 --- a/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/function_with_schedule_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/function_with_schedule_dlq_generated.json b/integration/resources/expected/combination/function_with_schedule_dlq_generated.json index bd0044265d..b60c4c8e06 100644 --- a/integration/resources/expected/combination/function_with_schedule_dlq_generated.json +++ b/integration/resources/expected/combination/function_with_schedule_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionRepeat", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionRepeatQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeat", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionRepeatQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/function_with_self_managed_kafka.json b/integration/resources/expected/combination/function_with_self_managed_kafka.json index 9cf3829605..4e39134ce4 100644 --- a/integration/resources/expected/combination/function_with_self_managed_kafka.json +++ b/integration/resources/expected/combination/function_with_self_managed_kafka.json @@ -15,4 +15,4 @@ "LogicalResourceId": "KafkaUserSecret", "ResourceType": "AWS::SecretsManager::Secret" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json b/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json index f4d3f90a53..352af6de6d 100644 --- a/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json +++ b/integration/resources/expected/combination/function_with_self_managed_kafka_intrinsics.json @@ -15,4 +15,4 @@ "LogicalResourceId": "KafkaUserSecret", "ResourceType": "AWS::SecretsManager::Secret" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_signing_profile.json b/integration/resources/expected/combination/function_with_signing_profile.json index 028381361d..e9e693ef87 100644 --- a/integration/resources/expected/combination/function_with_signing_profile.json +++ b/integration/resources/expected/combination/function_with_signing_profile.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyUnsignedLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyUnsignedLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySigningProfile", "ResourceType":"AWS::Signer::SigningProfile" }, - { "LogicalResourceId":"MySignedFunctionCodeSigningConfig", "ResourceType":"AWS::Lambda::CodeSigningConfig" } -] \ No newline at end of file + { + "LogicalResourceId": "MyUnsignedLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyUnsignedLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySigningProfile", + "ResourceType": "AWS::Signer::SigningProfile" + }, + { + "LogicalResourceId": "MySignedFunctionCodeSigningConfig", + "ResourceType": "AWS::Lambda::CodeSigningConfig" + } +] diff --git a/integration/resources/expected/combination/function_with_sns.json b/integration/resources/expected/combination/function_with_sns.json index d7d5111357..90c98cb4a8 100644 --- a/integration/resources/expected/combination/function_with_sns.json +++ b/integration/resources/expected/combination/function_with_sns.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionSNSEventPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MySnsTopic", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEvent", "ResourceType":"AWS::SNS::Subscription" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventEventSourceMapping", "ResourceType":"AWS::Lambda::EventSourceMapping" }, - { "LogicalResourceId":"MyLambdaFunctionSQSSubscriptionEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" }, - { "LogicalResourceId":"MyLambdaFunctionSNSEvent", "ResourceType":"AWS::SNS::Subscription" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionSNSEventPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MySnsTopic", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEvent", + "ResourceType": "AWS::SNS::Subscription" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventEventSourceMapping", + "ResourceType": "AWS::Lambda::EventSourceMapping" + }, + { + "LogicalResourceId": "MyLambdaFunctionSQSSubscriptionEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + }, + { + "LogicalResourceId": "MyLambdaFunctionSNSEvent", + "ResourceType": "AWS::SNS::Subscription" + } +] diff --git a/integration/resources/expected/combination/function_with_sns_intrinsics.json b/integration/resources/expected/combination/function_with_sns_intrinsics.json index 8d715ef5d1..eb53cd8805 100644 --- a/integration/resources/expected/combination/function_with_sns_intrinsics.json +++ b/integration/resources/expected/combination/function_with_sns_intrinsics.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyLambdaFunctionSNSEventQueuePolicy", "ResourceType": "AWS::SQS::QueuePolicy" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/combination/function_with_sqs.json b/integration/resources/expected/combination/function_with_sqs.json index 188e4c467a..ecb8dd073d 100644 --- a/integration/resources/expected/combination/function_with_sqs.json +++ b/integration/resources/expected/combination/function_with_sqs.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MySqsQueueFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MySqsQueueFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySqsQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MySqsQueueFunctionMySqsEvent", "ResourceType":"AWS::Lambda::EventSourceMapping" } -] \ No newline at end of file + { + "LogicalResourceId": "MySqsQueueFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MySqsQueueFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySqsQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MySqsQueueFunctionMySqsEvent", + "ResourceType": "AWS::Lambda::EventSourceMapping" + } +] diff --git a/integration/resources/expected/combination/function_with_userpool_event.json b/integration/resources/expected/combination/function_with_userpool_event.json index f55909f48c..2aeda3e480 100644 --- a/integration/resources/expected/combination/function_with_userpool_event.json +++ b/integration/resources/expected/combination/function_with_userpool_event.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyCognitoUserPool", "ResourceType":"AWS::Cognito::UserPool" }, - { "LogicalResourceId":"PreSignupLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"PreSignupLambdaFunctionCognitoPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"PreSignupLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyCognitoUserPool", + "ResourceType": "AWS::Cognito::UserPool" + }, + { + "LogicalResourceId": "PreSignupLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PreSignupLambdaFunctionCognitoPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "PreSignupLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_auth.json b/integration/resources/expected/combination/http_api_with_auth.json index 102d81d4fc..8df633121d 100644 --- a/integration/resources/expected/combination/http_api_with_auth.json +++ b/integration/resources/expected/combination/http_api_with_auth.json @@ -1,11 +1,38 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyAuthFn", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyAuthFnRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionDefaultApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyAuthFn", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyAuthFnRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionDefaultApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/http_api_with_cors.json b/integration/resources/expected/combination/http_api_with_cors.json index 8bbb430cd1..280c0bf684 100644 --- a/integration/resources/expected/combination/http_api_with_cors.json +++ b/integration/resources/expected/combination/http_api_with_cors.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"HttpApiFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"HttpApiFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"HttpApiFunctionImplicitApiPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessHttpApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"ServerlessHttpApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "HttpApiFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "HttpApiFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "HttpApiFunctionImplicitApiPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessHttpApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "ServerlessHttpApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional.json index 7c7db8ba40..c069daf32b 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2e7a0af471b", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2e7a0af471b", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json index 9808fb950c..79cd349153 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_feature_toggle.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV26198c55d75", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV26198c55d75", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json index cedc716495..a2cfab55a7 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupddfc299be2", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2804ee5e222", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupddfc299be2", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2804ee5e222", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json index 3e37f7b6a9..790f04e469 100644 --- a/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json +++ b/integration/resources/expected/combination/http_api_with_custom_domains_regional_ownership_verification_feature_toggle.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApipostApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApigetApiMapping", "ResourceType":"AWS::ApiGatewayV2::ApiMapping" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"RecordSetGroupd17dced08c", "ResourceType":"AWS::Route53::RecordSetGroup" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"ApiGatewayDomainNameV2483cac8ea6", "ResourceType":"AWS::ApiGatewayV2::DomainName" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApipostApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApigetApiMapping", + "ResourceType": "AWS::ApiGatewayV2::ApiMapping" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "RecordSetGroupd17dced08c", + "ResourceType": "AWS::Route53::RecordSetGroup" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "ApiGatewayDomainNameV2483cac8ea6", + "ResourceType": "AWS::ApiGatewayV2::DomainName" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json index a565235569..def5007176 100644 --- a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json +++ b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_false.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json index a565235569..def5007176 100644 --- a/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json +++ b/integration/resources/expected/combination/http_api_with_disable_execute_api_endpoint_true.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyFunctionImplicitGetPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyFunctionImplicitPostPermission", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api" }, - { "LogicalResourceId":"MyApiProdStage", "ResourceType":"AWS::ApiGatewayV2::Stage" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunctionImplicitGetPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyFunctionImplicitPostPermission", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiProdStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/implicit_api_with_settings.json b/integration/resources/expected/combination/implicit_api_with_settings.json index 0893a580e7..a4a5ea7636 100644 --- a/integration/resources/expected/combination/implicit_api_with_settings.json +++ b/integration/resources/expected/combination/implicit_api_with_settings.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionProd", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionProd", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_code_definition_uri.json b/integration/resources/expected/combination/intrinsics_code_definition_uri.json index 56d4435fc8..b1a0986562 100644 --- a/integration/resources/expected/combination/intrinsics_code_definition_uri.json +++ b/integration/resources/expected/combination/intrinsics_code_definition_uri.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiFancyNameStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiFancyNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_serverless_api.json b/integration/resources/expected/combination/intrinsics_serverless_api.json index 982a543355..e816637d57 100644 --- a/integration/resources/expected/combination/intrinsics_serverless_api.json +++ b/integration/resources/expected/combination/intrinsics_serverless_api.json @@ -1,9 +1,30 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyLambdaFunctionPostApiPermissionStage", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyLambdaFunctionGetApiPermissionStage", "ResourceType":"AWS::Lambda::Permission" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiStage", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyLambdaFunctionPostApiPermissionStage", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyLambdaFunctionGetApiPermissionStage", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiStage", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/combination/intrinsics_serverless_function.json b/integration/resources/expected/combination/intrinsics_serverless_function.json index ef8334560c..f443a2c8d0 100644 --- a/integration/resources/expected/combination/intrinsics_serverless_function.json +++ b/integration/resources/expected/combination/intrinsics_serverless_function.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyNewRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MySecurityGroup", "ResourceType":"AWS::EC2::SecurityGroup" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyNewRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MySecurityGroup", + "ResourceType": "AWS::EC2::SecurityGroup" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_api.json b/integration/resources/expected/combination/state_machine_with_api.json index 05f14d1530..6317543d71 100644 --- a/integration/resources/expected/combination/state_machine_with_api.json +++ b/integration/resources/expected/combination/state_machine_with_api.json @@ -1,12 +1,42 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"ExistingRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ExistingRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ExistingRestApiDevStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"ServerlessRestApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"ServerlessRestApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"ServerlessRestApiProdStage", "ResourceType":"AWS::ApiGateway::Stage" }, - { "LogicalResourceId":"MyStateMachinePostApiRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineGetApiRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "ExistingRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ExistingRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ExistingRestApiDevStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "ServerlessRestApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "ServerlessRestApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "ServerlessRestApiProdStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "MyStateMachinePostApiRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineGetApiRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe.json b/integration/resources/expected/combination/state_machine_with_cwe.json index ee21302f53..6f07bde562 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe.json +++ b/integration/resources/expected/combination/state_machine_with_cwe.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json b/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json index a8b630642e..06151425c6 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json +++ b/integration/resources/expected/combination/state_machine_with_cwe_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEventQueue", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyStateMachineCWEventQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEventQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyStateMachineCWEventQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json b/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json index 692dad06cd..8b2ba10aeb 100644 --- a/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/state_machine_with_cwe_with_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWEvent", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWEventRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWEvent", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWEventRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_policy_templates.json b/integration/resources/expected/combination/state_machine_with_policy_templates.json index 9571f1a59d..165c31d856 100644 --- a/integration/resources/expected/combination/state_machine_with_policy_templates.json +++ b/integration/resources/expected/combination/state_machine_with_policy_templates.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule.json b/integration/resources/expected/combination/state_machine_with_schedule.json index 38e01119b0..63814349df 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule.json +++ b/integration/resources/expected/combination/state_machine_with_schedule.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json b/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json index 94b05653dd..4ef556dad6 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json +++ b/integration/resources/expected/combination/state_machine_with_schedule_dlq_and_retry_policy.json @@ -1,7 +1,22 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDeadLetterQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDeadLetterQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json b/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json index 86883f534d..d2b8a2afc3 100644 --- a/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json +++ b/integration/resources/expected/combination/state_machine_with_schedule_dlq_generated.json @@ -1,8 +1,26 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine" }, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyStateMachineCWSchedule", "ResourceType":"AWS::Events::Rule" }, - { "LogicalResourceId":"MyStateMachineCWScheduleRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyDlq", "ResourceType":"AWS::SQS::Queue" }, - { "LogicalResourceId":"MyStateMachineCWScheduleQueuePolicy", "ResourceType":"AWS::SQS::QueuePolicy" } -] \ No newline at end of file + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyStateMachineCWSchedule", + "ResourceType": "AWS::Events::Rule" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyDlq", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyStateMachineCWScheduleQueuePolicy", + "ResourceType": "AWS::SQS::QueuePolicy" + } +] diff --git a/integration/resources/expected/single/basic_api.json b/integration/resources/expected/single/basic_api.json index d45cb8ce34..543e360fcf 100644 --- a/integration/resources/expected/single/basic_api.json +++ b/integration/resources/expected/single/basic_api.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_openapi.json b/integration/resources/expected/single/basic_api_inline_openapi.json index d45cb8ce34..543e360fcf 100644 --- a/integration/resources/expected/single/basic_api_inline_openapi.json +++ b/integration/resources/expected/single/basic_api_inline_openapi.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_swagger.json b/integration/resources/expected/single/basic_api_inline_swagger.json index d45cb8ce34..543e360fcf 100644 --- a/integration/resources/expected/single/basic_api_inline_swagger.json +++ b/integration/resources/expected/single/basic_api_inline_swagger.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_with_cache.json b/integration/resources/expected/single/basic_api_inline_with_cache.json index d45cb8ce34..543e360fcf 100644 --- a/integration/resources/expected/single/basic_api_inline_with_cache.json +++ b/integration/resources/expected/single/basic_api_inline_with_cache.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiMyNewStageNameStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_inline_with_tags.json b/integration/resources/expected/single/basic_api_inline_with_tags.json index 84d8e643ff..07cadc9360 100644 --- a/integration/resources/expected/single/basic_api_inline_with_tags.json +++ b/integration/resources/expected/single/basic_api_inline_with_tags.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiStage", "ResourceType":"AWS::ApiGateway::Stage" } + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiStage", + "ResourceType": "AWS::ApiGateway::Stage" + } ] diff --git a/integration/resources/expected/single/basic_api_with_mode.json b/integration/resources/expected/single/basic_api_with_mode.json index 15c83189e6..52316975af 100644 --- a/integration/resources/expected/single/basic_api_with_mode.json +++ b/integration/resources/expected/single/basic_api_with_mode.json @@ -1,11 +1,38 @@ [ - {"LogicalResourceId": "MyApi", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "MyApiDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "MyApiMyNewStageNameStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "TestFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "TestFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias"}, - {"LogicalResourceId": "TestFunctionGetPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionRole", "ResourceType": "AWS::IAM::Role"}, - {"LogicalResourceId": "TestFunctionVersion", "ResourceType": "AWS::Lambda::Version"} - ] + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "TestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "TestFunctionAliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "TestFunctionGetPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "TestFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/single/basic_api_with_mode_update.json b/integration/resources/expected/single/basic_api_with_mode_update.json index cc143fb241..d19a9c4210 100644 --- a/integration/resources/expected/single/basic_api_with_mode_update.json +++ b/integration/resources/expected/single/basic_api_with_mode_update.json @@ -1,10 +1,34 @@ [ - {"LogicalResourceId": "MyApi", "ResourceType": "AWS::ApiGateway::RestApi"}, - {"LogicalResourceId": "MyApiDeployment", "ResourceType": "AWS::ApiGateway::Deployment"}, - {"LogicalResourceId": "MyApiMyNewStageNameStage", "ResourceType": "AWS::ApiGateway::Stage"}, - {"LogicalResourceId": "TestFunction", "ResourceType": "AWS::Lambda::Function"}, - {"LogicalResourceId": "TestFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias"}, - {"LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", "ResourceType": "AWS::Lambda::Permission"}, - {"LogicalResourceId": "TestFunctionRole", "ResourceType": "AWS::IAM::Role"}, - {"LogicalResourceId": "TestFunctionVersion", "ResourceType": "AWS::Lambda::Version"} - ] + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiMyNewStageNameStage", + "ResourceType": "AWS::ApiGateway::Stage" + }, + { + "LogicalResourceId": "TestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "TestFunctionAliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "TestFunctionPutPermissionMyNewStageName", + "ResourceType": "AWS::Lambda::Permission" + }, + { + "LogicalResourceId": "TestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "TestFunctionVersion", + "ResourceType": "AWS::Lambda::Version" + } +] diff --git a/integration/resources/expected/single/basic_api_with_tags.json b/integration/resources/expected/single/basic_api_with_tags.json index fde444738c..3f339273eb 100644 --- a/integration/resources/expected/single/basic_api_with_tags.json +++ b/integration/resources/expected/single/basic_api_with_tags.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGateway::RestApi" }, - { "LogicalResourceId":"MyApiDeployment", "ResourceType":"AWS::ApiGateway::Deployment" }, - { "LogicalResourceId":"MyApiStage00dadc1ecc", "ResourceType":"AWS::ApiGateway::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGateway::RestApi" + }, + { + "LogicalResourceId": "MyApiDeployment", + "ResourceType": "AWS::ApiGateway::Deployment" + }, + { + "LogicalResourceId": "MyApiStage00dadc1ecc", + "ResourceType": "AWS::ApiGateway::Stage" + } +] diff --git a/integration/resources/expected/single/basic_application_s3_location.json b/integration/resources/expected/single/basic_application_s3_location.json index a033c90b76..ee7e59b892 100644 --- a/integration/resources/expected/single/basic_application_s3_location.json +++ b/integration/resources/expected/single/basic_application_s3_location.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + } ] diff --git a/integration/resources/expected/single/basic_application_sar_location.json b/integration/resources/expected/single/basic_application_sar_location.json index a033c90b76..ee7e59b892 100644 --- a/integration/resources/expected/single/basic_application_sar_location.json +++ b/integration/resources/expected/single/basic_application_sar_location.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + } ] diff --git a/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json b/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json index 884f93d12e..421b200785 100644 --- a/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json +++ b/integration/resources/expected/single/basic_application_sar_location_with_intrinsics.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyNestedApp", "ResourceType":"AWS::CloudFormation::Stack" }, - { "LogicalResourceId":"MySns", "ResourceType":"AWS::SNS::Topic" } + { + "LogicalResourceId": "MyNestedApp", + "ResourceType": "AWS::CloudFormation::Stack" + }, + { + "LogicalResourceId": "MySns", + "ResourceType": "AWS::SNS::Topic" + } ] diff --git a/integration/resources/expected/single/basic_function.json b/integration/resources/expected/single/basic_function.json index 2cb129f54d..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function.json +++ b/integration/resources/expected/single/basic_function.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/basic_function_event_destinations.json b/integration/resources/expected/single/basic_function_event_destinations.json index 3588c9d130..390eaafbff 100644 --- a/integration/resources/expected/single/basic_function_event_destinations.json +++ b/integration/resources/expected/single/basic_function_event_destinations.json @@ -1,14 +1,50 @@ [ - { "LogicalResourceId":"MyTestFunction2", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2EventInvokeConfigOnSuccessTopic", "ResourceType":"AWS::SNS::Topic" }, - { "LogicalResourceId":"MyTestFunctionRole", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"MyTestFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2Aliaslive", "ResourceType":"AWS::Lambda::Alias"}, - { "LogicalResourceId":"MyTestFunctionEventInvokeConfigOnSuccessQueue", "ResourceType":"AWS::SQS::Queue"}, - { "LogicalResourceId":"MyTestFunction2Role", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"DestinationLambda", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyTestFunction2EventInvokeConfig", "ResourceType":"AWS::Lambda::EventInvokeConfig"}, - { "LogicalResourceId":"MyTestFunction2Version", "ResourceType":"AWS::Lambda::Version"}, - { "LogicalResourceId":"MyTestFunctionEventInvokeConfig", "ResourceType":"AWS::Lambda::EventInvokeConfig"}, - { "LogicalResourceId":"DestinationLambdaRole", "ResourceType":"AWS::IAM::Role"} -] \ No newline at end of file + { + "LogicalResourceId": "MyTestFunction2", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2EventInvokeConfigOnSuccessTopic", + "ResourceType": "AWS::SNS::Topic" + }, + { + "LogicalResourceId": "MyTestFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTestFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2Aliaslive", + "ResourceType": "AWS::Lambda::Alias" + }, + { + "LogicalResourceId": "MyTestFunctionEventInvokeConfigOnSuccessQueue", + "ResourceType": "AWS::SQS::Queue" + }, + { + "LogicalResourceId": "MyTestFunction2Role", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "DestinationLambda", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyTestFunction2EventInvokeConfig", + "ResourceType": "AWS::Lambda::EventInvokeConfig" + }, + { + "LogicalResourceId": "MyTestFunction2Version", + "ResourceType": "AWS::Lambda::Version" + }, + { + "LogicalResourceId": "MyTestFunctionEventInvokeConfig", + "ResourceType": "AWS::Lambda::EventInvokeConfig" + }, + { + "LogicalResourceId": "DestinationLambdaRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_no_envvar.json b/integration/resources/expected/single/basic_function_no_envvar.json index 98d62e4bbd..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function_no_envvar.json +++ b/integration/resources/expected/single/basic_function_no_envvar.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_openapi.json b/integration/resources/expected/single/basic_function_openapi.json index 98d62e4bbd..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function_openapi.json +++ b/integration/resources/expected/single/basic_function_openapi.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_with_arm_architecture.json b/integration/resources/expected/single/basic_function_with_arm_architecture.json index 3e8d999dfd..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function_with_arm_architecture.json +++ b/integration/resources/expected/single/basic_function_with_arm_architecture.json @@ -7,4 +7,4 @@ "LogicalResourceId": "MyLambdaFunctionRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_function_url_config.json b/integration/resources/expected/single/basic_function_with_function_url_config.json index 1299957b2d..59ce31d979 100644 --- a/integration/resources/expected/single/basic_function_with_function_url_config.json +++ b/integration/resources/expected/single/basic_function_with_function_url_config.json @@ -15,4 +15,4 @@ "LogicalResourceId": "MyLambdaFunctionUrlPublicPermissions", "ResourceType": "AWS::Lambda::Permission" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json b/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json index 5696926f31..dfc9069279 100644 --- a/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json +++ b/integration/resources/expected/single/basic_function_with_function_url_with_autopuplishalias.json @@ -23,4 +23,4 @@ "LogicalResourceId": "MyLambdaFunctionUrlPublicPermissions", "ResourceType": "AWS::Lambda::Permission" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_function_with_kmskeyarn.json b/integration/resources/expected/single/basic_function_with_kmskeyarn.json index 5cba0276b4..dadc635adf 100644 --- a/integration/resources/expected/single/basic_function_with_kmskeyarn.json +++ b/integration/resources/expected/single/basic_function_with_kmskeyarn.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"BasicFunctionWithKmsKeyArn", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"BasicFunctionWithKmsKeyArnRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyKey", "ResourceType":"AWS::KMS::Key" } + { + "LogicalResourceId": "BasicFunctionWithKmsKeyArn", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "BasicFunctionWithKmsKeyArnRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyKey", + "ResourceType": "AWS::KMS::Key" + } ] diff --git a/integration/resources/expected/single/basic_function_with_sns_dlq.json b/integration/resources/expected/single/basic_function_with_sns_dlq.json index 3ded5dd12c..004b61c710 100644 --- a/integration/resources/expected/single/basic_function_with_sns_dlq.json +++ b/integration/resources/expected/single/basic_function_with_sns_dlq.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyTopic", "ResourceType":"AWS::SNS::Topic" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyTopic", + "ResourceType": "AWS::SNS::Topic" + } +] diff --git a/integration/resources/expected/single/basic_function_with_sqs_dlq.json b/integration/resources/expected/single/basic_function_with_sqs_dlq.json index a29c8734bc..fa491013e3 100644 --- a/integration/resources/expected/single/basic_function_with_sqs_dlq.json +++ b/integration/resources/expected/single/basic_function_with_sqs_dlq.json @@ -1,5 +1,14 @@ [ - { "LogicalResourceId":"MyFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyFunctionRole", "ResourceType":"AWS::IAM::Role" }, - { "LogicalResourceId":"MyQueue", "ResourceType":"AWS::SQS::Queue" } -] \ No newline at end of file + { + "LogicalResourceId": "MyFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "MyQueue", + "ResourceType": "AWS::SQS::Queue" + } +] diff --git a/integration/resources/expected/single/basic_function_with_tags.json b/integration/resources/expected/single/basic_function_with_tags.json index 4e83eaf6b0..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function_with_tags.json +++ b/integration/resources/expected/single/basic_function_with_tags.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/basic_function_with_tracing.json b/integration/resources/expected/single/basic_function_with_tracing.json index e47b43ddd8..bdf68de49e 100644 --- a/integration/resources/expected/single/basic_function_with_tracing.json +++ b/integration/resources/expected/single/basic_function_with_tracing.json @@ -1,6 +1,18 @@ [ - { "LogicalResourceId":"ActiveTracingFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"ActiveTracingFunctionRole", "ResourceType":"AWS::IAM::Role"}, - { "LogicalResourceId":"PassThroughTracingFunction", "ResourceType":"AWS::Lambda::Function"}, - { "LogicalResourceId":"PassThroughTracingFunctionRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "ActiveTracingFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "ActiveTracingFunctionRole", + "ResourceType": "AWS::IAM::Role" + }, + { + "LogicalResourceId": "PassThroughTracingFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "PassThroughTracingFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_function_with_x86_architecture.json b/integration/resources/expected/single/basic_function_with_x86_architecture.json index 3e8d999dfd..d4dfecb350 100644 --- a/integration/resources/expected/single/basic_function_with_x86_architecture.json +++ b/integration/resources/expected/single/basic_function_with_x86_architecture.json @@ -7,4 +7,4 @@ "LogicalResourceId": "MyLambdaFunctionRole", "ResourceType": "AWS::IAM::Role" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/basic_http_api.json b/integration/resources/expected/single/basic_http_api.json index 7fac895cbd..5e14fb5b94 100644 --- a/integration/resources/expected/single/basic_http_api.json +++ b/integration/resources/expected/single/basic_http_api.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyApi", "ResourceType":"AWS::ApiGatewayV2::Api"}, - { "LogicalResourceId":"MyApiApiGatewayDefaultStage", "ResourceType":"AWS::ApiGatewayV2::Stage" } -] \ No newline at end of file + { + "LogicalResourceId": "MyApi", + "ResourceType": "AWS::ApiGatewayV2::Api" + }, + { + "LogicalResourceId": "MyApiApiGatewayDefaultStage", + "ResourceType": "AWS::ApiGatewayV2::Stage" + } +] diff --git a/integration/resources/expected/single/basic_layer.json b/integration/resources/expected/single/basic_layer.json index beba3153c7..8b12e137e9 100644 --- a/integration/resources/expected/single/basic_layer.json +++ b/integration/resources/expected/single/basic_layer.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_layer_with_compatible_architecture.json b/integration/resources/expected/single/basic_layer_with_compatible_architecture.json index beba3153c7..8b12e137e9 100644 --- a/integration/resources/expected/single/basic_layer_with_compatible_architecture.json +++ b/integration/resources/expected/single/basic_layer_with_compatible_architecture.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_layer_with_parameters.json b/integration/resources/expected/single/basic_layer_with_parameters.json index beba3153c7..8b12e137e9 100644 --- a/integration/resources/expected/single/basic_layer_with_parameters.json +++ b/integration/resources/expected/single/basic_layer_with_parameters.json @@ -1,3 +1,6 @@ [ - { "LogicalResourceId":"MyLayerVersion", "ResourceType":"AWS::Lambda::LayerVersion"} -] \ No newline at end of file + { + "LogicalResourceId": "MyLayerVersion", + "ResourceType": "AWS::Lambda::LayerVersion" + } +] diff --git a/integration/resources/expected/single/basic_state_machine_inline_definition.json b/integration/resources/expected/single/basic_state_machine_inline_definition.json index 4d778a7e46..3f80c27815 100644 --- a/integration/resources/expected/single/basic_state_machine_inline_definition.json +++ b/integration/resources/expected/single/basic_state_machine_inline_definition.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyBasicStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine"}, - { "LogicalResourceId":"MyBasicStateMachineRole", "ResourceType":"AWS::IAM::Role" } -] \ No newline at end of file + { + "LogicalResourceId": "MyBasicStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyBasicStateMachineRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/basic_state_machine_with_tags.json b/integration/resources/expected/single/basic_state_machine_with_tags.json index 976394f6bf..b7bf8a7957 100644 --- a/integration/resources/expected/single/basic_state_machine_with_tags.json +++ b/integration/resources/expected/single/basic_state_machine_with_tags.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyStateMachine", "ResourceType":"AWS::StepFunctions::StateMachine"}, - { "LogicalResourceId":"MyStateMachineRole", "ResourceType":"AWS::IAM::Role" } + { + "LogicalResourceId": "MyStateMachine", + "ResourceType": "AWS::StepFunctions::StateMachine" + }, + { + "LogicalResourceId": "MyStateMachineRole", + "ResourceType": "AWS::IAM::Role" + } ] diff --git a/integration/resources/expected/single/function_alias_with_http_api_events.json b/integration/resources/expected/single/function_alias_with_http_api_events.json index 8001cf476b..7689d60132 100644 --- a/integration/resources/expected/single/function_alias_with_http_api_events.json +++ b/integration/resources/expected/single/function_alias_with_http_api_events.json @@ -1,10 +1,34 @@ [ - { "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" } + { + "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" + } ] diff --git a/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json b/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json index c71bcec273..e986be9e34 100644 --- a/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json +++ b/integration/resources/expected/single/function_with_deployment_preference_alarms_intrinsic_if.json @@ -27,4 +27,4 @@ "LogicalResourceId": "MyLambdaFunctionAliaslive", "ResourceType": "AWS::Lambda::Alias" } -] \ No newline at end of file +] diff --git a/integration/resources/expected/single/function_with_ephemeral_storage.json b/integration/resources/expected/single/function_with_ephemeral_storage.json index 5cc61a85cb..d4dfecb350 100644 --- a/integration/resources/expected/single/function_with_ephemeral_storage.json +++ b/integration/resources/expected/single/function_with_ephemeral_storage.json @@ -1,4 +1,10 @@ [ - { "LogicalResourceId":"MyLambdaFunction", "ResourceType":"AWS::Lambda::Function" }, - { "LogicalResourceId":"MyLambdaFunctionRole", "ResourceType":"AWS::IAM::Role" } - ] \ No newline at end of file + { + "LogicalResourceId": "MyLambdaFunction", + "ResourceType": "AWS::Lambda::Function" + }, + { + "LogicalResourceId": "MyLambdaFunctionRole", + "ResourceType": "AWS::IAM::Role" + } +] diff --git a/integration/resources/expected/single/function_with_http_api_events.json b/integration/resources/expected/single/function_with_http_api_events.json index 14e65d3101..cc7e3cc240 100644 --- a/integration/resources/expected/single/function_with_http_api_events.json +++ b/integration/resources/expected/single/function_with_http_api_events.json @@ -1,7 +1,22 @@ [ - { "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" } + { + "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" + } ] diff --git a/integration/resources/templates/combination/all_policy_templates.yaml b/integration/resources/templates/combination/all_policy_templates.yaml index a781aaa8ee..2f46fc9276 100644 --- a/integration/resources/templates/combination/all_policy_templates.yaml +++ b/integration/resources/templates/combination/all_policy_templates.yaml @@ -4,206 +4,206 @@ Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SQSPollerPolicy: - QueueName: name + - SQSPollerPolicy: + QueueName: name - - LambdaInvokePolicy: - FunctionName: name + - LambdaInvokePolicy: + FunctionName: name - - CloudWatchPutMetricPolicy: {} + - CloudWatchPutMetricPolicy: {} - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} - - DynamoDBCrudPolicy: - TableName: name + - DynamoDBCrudPolicy: + TableName: name - - DynamoDBReadPolicy: - TableName: name + - DynamoDBReadPolicy: + TableName: name - - SESSendBouncePolicy: - IdentityName: name + - SESSendBouncePolicy: + IdentityName: name - - ElasticsearchHttpPostPolicy: - DomainName: name + - ElasticsearchHttpPostPolicy: + DomainName: name - - S3ReadPolicy: - BucketName: name + - S3ReadPolicy: + BucketName: name - - S3CrudPolicy: - BucketName: name + - S3CrudPolicy: + BucketName: name - - AMIDescribePolicy: {} + - AMIDescribePolicy: {} - - CloudFormationDescribeStacksPolicy: {} + - CloudFormationDescribeStacksPolicy: {} - - RekognitionDetectOnlyPolicy: {} + - RekognitionDetectOnlyPolicy: {} - - RekognitionNoDataAccessPolicy: - CollectionId: id + - RekognitionNoDataAccessPolicy: + CollectionId: id - - RekognitionReadPolicy: - CollectionId: id + - RekognitionReadPolicy: + CollectionId: id - - RekognitionWriteOnlyAccessPolicy: - CollectionId: id + - RekognitionWriteOnlyAccessPolicy: + CollectionId: id - - SQSSendMessagePolicy: - QueueName: name + - SQSSendMessagePolicy: + QueueName: name - - SNSPublishMessagePolicy: - TopicName: name + - SNSPublishMessagePolicy: + TopicName: name - - VPCAccessPolicy: {} + - VPCAccessPolicy: {} - - DynamoDBStreamReadPolicy: - TableName: name - StreamName: name + - DynamoDBStreamReadPolicy: + TableName: name + StreamName: name - - KinesisStreamReadPolicy: - StreamName: name + - KinesisStreamReadPolicy: + StreamName: name - - SESCrudPolicy: - IdentityName: name + - SESCrudPolicy: + IdentityName: name - - SNSCrudPolicy: - TopicName: name + - SNSCrudPolicy: + TopicName: name - - KinesisCrudPolicy: - StreamName: name + - KinesisCrudPolicy: + StreamName: name - - KMSDecryptPolicy: - KeyId: keyId + - KMSDecryptPolicy: + KeyId: keyId - - PollyFullAccessPolicy: - LexiconName: name + - PollyFullAccessPolicy: + LexiconName: name - - S3FullAccessPolicy: - BucketName: name + - S3FullAccessPolicy: + BucketName: name - - CodePipelineLambdaExecutionPolicy: {} + - CodePipelineLambdaExecutionPolicy: {} - - ServerlessRepoReadWriteAccessPolicy: {} + - ServerlessRepoReadWriteAccessPolicy: {} - - EC2CopyImagePolicy: - ImageId: id + - EC2CopyImagePolicy: + ImageId: id - - CodePipelineReadOnlyPolicy: - PipelineName: pipeline + - CodePipelineReadOnlyPolicy: + PipelineName: pipeline - - CloudWatchDashboardPolicy: {} + - CloudWatchDashboardPolicy: {} - - RekognitionFacesPolicy: {} + - RekognitionFacesPolicy: {} - - RekognitionLabelsPolicy: {} + - RekognitionLabelsPolicy: {} - - DynamoDBBackupFullAccessPolicy: - TableName: table + - DynamoDBBackupFullAccessPolicy: + TableName: table - - DynamoDBRestoreFromBackupPolicy: - TableName: table + - DynamoDBRestoreFromBackupPolicy: + TableName: table - - ComprehendBasicAccessPolicy: {} + - ComprehendBasicAccessPolicy: {} - - AWSSecretsManagerGetSecretValuePolicy: - SecretArn: - Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:MyTestDatabaseSecret-a1b2c3 + - AWSSecretsManagerGetSecretValuePolicy: + SecretArn: + Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:MyTestDatabaseSecret-a1b2c3 - - AWSSecretsManagerRotationPolicy: - FunctionName: function + - AWSSecretsManagerRotationPolicy: + FunctionName: function MyFunction2: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SESEmailTemplateCrudPolicy: {} + - SESEmailTemplateCrudPolicy: {} - - SSMParameterReadPolicy: - ParameterName: name + - SSMParameterReadPolicy: + ParameterName: name - - MobileAnalyticsWriteOnlyAccessPolicy: {} + - MobileAnalyticsWriteOnlyAccessPolicy: {} - - PinpointEndpointAccessPolicy: - PinpointApplicationId: id + - PinpointEndpointAccessPolicy: + PinpointApplicationId: id - - FirehoseWritePolicy: - DeliveryStreamName: deliveryStream + - FirehoseWritePolicy: + DeliveryStreamName: deliveryStream - - FirehoseCrudPolicy: - DeliveryStreamName: deliveryStream + - FirehoseCrudPolicy: + DeliveryStreamName: deliveryStream - - EKSDescribePolicy: {} + - EKSDescribePolicy: {} - - CostExplorerReadOnlyPolicy: {} + - CostExplorerReadOnlyPolicy: {} - - OrganizationsListAccountsPolicy: {} + - OrganizationsListAccountsPolicy: {} - - DynamoDBReconfigurePolicy: - TableName: table + - DynamoDBReconfigurePolicy: + TableName: table - - SESBulkTemplatedCrudPolicy: - IdentityName: name + - SESBulkTemplatedCrudPolicy: + IdentityName: name - - FilterLogEventsPolicy: - LogGroupName: name + - FilterLogEventsPolicy: + LogGroupName: name - - StepFunctionsExecutionPolicy: - StateMachineName: name + - StepFunctionsExecutionPolicy: + StateMachineName: name - - CodeCommitCrudPolicy: - RepositoryName: name + - CodeCommitCrudPolicy: + RepositoryName: name - - CodeCommitReadPolicy: - RepositoryName: name - - - TextractPolicy: {} + - CodeCommitReadPolicy: + RepositoryName: name - - TextractDetectAnalyzePolicy: {} + - TextractPolicy: {} - - TextractGetResultPolicy: {} + - TextractDetectAnalyzePolicy: {} - - DynamoDBWritePolicy: - TableName: name + - TextractGetResultPolicy: {} - - S3WritePolicy: - BucketName: name + - DynamoDBWritePolicy: + TableName: name - - EFSWriteAccessPolicy: - AccessPoint: name - FileSystem: name + - S3WritePolicy: + BucketName: name + + - EFSWriteAccessPolicy: + AccessPoint: name + FileSystem: name MyFunction3: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - ElasticMapReduceModifyInstanceFleetPolicy: - ClusterId: name - - ElasticMapReduceSetTerminationProtectionPolicy: - ClusterId: name - - ElasticMapReduceModifyInstanceGroupsPolicy: - ClusterId: name - - ElasticMapReduceCancelStepsPolicy: - ClusterId: name - - ElasticMapReduceTerminateJobFlowsPolicy: - ClusterId: name - - ElasticMapReduceAddJobFlowStepsPolicy: - ClusterId: name - - SageMakerCreateEndpointPolicy: - EndpointName: name - - SageMakerCreateEndpointConfigPolicy: - EndpointConfigName: name - - EcsRunTaskPolicy: - TaskDefinition: name + - ElasticMapReduceModifyInstanceFleetPolicy: + ClusterId: name + - ElasticMapReduceSetTerminationProtectionPolicy: + ClusterId: name + - ElasticMapReduceModifyInstanceGroupsPolicy: + ClusterId: name + - ElasticMapReduceCancelStepsPolicy: + ClusterId: name + - ElasticMapReduceTerminateJobFlowsPolicy: + ClusterId: name + - ElasticMapReduceAddJobFlowStepsPolicy: + ClusterId: name + - SageMakerCreateEndpointPolicy: + EndpointName: name + - SageMakerCreateEndpointConfigPolicy: + EndpointConfigName: name + - EcsRunTaskPolicy: + TaskDefinition: name diff --git a/integration/resources/templates/combination/api_with_authorizer_apikey.yaml b/integration/resources/templates/combination/api_with_authorizer_apikey.yaml index 2a722e81a0..69fc18433a 100644 --- a/integration/resources/templates/combination/api_with_authorizer_apikey.yaml +++ b/integration/resources/templates/combination/api_with_authorizer_apikey.yaml @@ -40,7 +40,7 @@ Resources: Auth: Authorizer: MyLambdaTokenAuth ApiKeyRequired: true - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -70,26 +70,26 @@ Resources: MyFirstApiKey: Type: AWS::ApiGateway::ApiKey DependsOn: - - MyUsagePlan + - MyUsagePlan Properties: Enabled: true Value: at_least_20_characters StageKeys: - - RestApiId: - Ref: MyApi - StageName: - Ref: MyApi.Stage + - RestApiId: + Ref: MyApi + StageName: + Ref: MyApi.Stage MyUsagePlan: Type: AWS::ApiGateway::UsagePlan DependsOn: - - MyApi + - MyApi Properties: ApiStages: - - ApiId: - Ref: MyApi - Stage: - Ref: MyApi.Stage + - ApiId: + Ref: MyApi + Stage: + Ref: MyApi.Stage MyUsagePlanKey: Type: AWS::ApiGateway::UsagePlanKey @@ -101,16 +101,16 @@ Resources: KeyType: API_KEY Outputs: - ApiKeyId: - Description: "API Key ID" - Value: - Fn::GetAtt: MyFirstApiKey.APIKeyId - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiKeyId: + Description: API Key ID + Value: + Fn::GetAtt: MyFirstApiKey.APIKeyId + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn diff --git a/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml b/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml index cb54d2fc75..61b001322c 100644 --- a/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_invokefunction_set_none.yaml @@ -62,7 +62,7 @@ Resources: MyApiWithNoAuth: Type: Api Properties: - RestApiId: + RestApiId: Ref: MyApiWithAwsIamAuthNoCallerCredentials Path: /api/without-auth Method: get @@ -70,7 +70,7 @@ Resources: Authorizer: NONE Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApiWithAwsIamAuthNoCallerCredentials}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApiWithAwsIamAuthNoCallerCredentials}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_authorizers_max.yaml b/integration/resources/templates/combination/api_with_authorizers_max.yaml index bffffa2d94..1075b8137e 100644 --- a/integration/resources/templates/combination/api_with_authorizers_max.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_max.yaml @@ -8,8 +8,8 @@ Resources: Authorizers: MyCognitoAuthorizer: UserPoolArn: - - Fn::GetAtt: MyCognitoUserPool.Arn - - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + - Fn::GetAtt: MyCognitoUserPool.Arn + - Fn::GetAtt: MyCognitoUserPoolTwo.Arn Identity: Header: MyAuthorizationHeader ValidationExpression: myauthvalidationexpression @@ -33,10 +33,10 @@ Resources: Fn::GetAtt: LambdaAuthInvokeRole.Arn Identity: Headers: - - authorizationHeader + - authorizationHeader QueryStrings: - - authorization - - authorizationQueryString1 + - authorization + - authorizationQueryString1 ReauthorizeEvery: 0 MyFunction: @@ -96,7 +96,7 @@ Resources: Auth: Authorizer: AWS_IAM InvokeRole: CALLER_CREDENTIALS - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -160,7 +160,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPoolTwo - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -170,27 +170,27 @@ Resources: GenerateSecret: false Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn - CognitoUserPoolTwoArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + CognitoUserPoolTwoArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPoolTwo.Arn - LambdaAuthInvokeRoleArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: LambdaAuthInvokeRole.Arn \ No newline at end of file + LambdaAuthInvokeRoleArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: LambdaAuthInvokeRole.Arn diff --git a/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml b/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml index 1fd19ed3b3..dd062e1e82 100644 --- a/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml @@ -11,8 +11,8 @@ Resources: Authorizers: MyCognitoAuthorizer: UserPoolArn: - - Fn::GetAtt: MyCognitoUserPool.Arn - - Fn::GetAtt: MyCognitoUserPoolTwo.Arn + - Fn::GetAtt: MyCognitoUserPool.Arn + - Fn::GetAtt: MyCognitoUserPoolTwo.Arn Identity: Header: MyAuthorizationHeader ValidationExpression: myauthvalidationexpression @@ -36,10 +36,10 @@ Resources: Fn::GetAtt: LambdaAuthInvokeRole.Arn Identity: Headers: - - authorizationHeader + - authorizationHeader QueryStrings: - - authorization - - authorizationQueryString1 + - authorization + - authorizationQueryString1 ReauthorizeEvery: 0 MyFunction: @@ -172,7 +172,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPoolTwo - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -184,25 +184,25 @@ Resources: MyFirstApiKey: Type: AWS::ApiGateway::ApiKey DependsOn: - - MyUsagePlan + - MyUsagePlan Properties: Enabled: true StageKeys: - - RestApiId: - Ref: MyApi - StageName: - Ref: MyApi.Stage + - RestApiId: + Ref: MyApi + StageName: + Ref: MyApi.Stage MyUsagePlan: Type: AWS::ApiGateway::UsagePlan DependsOn: - - MyApi + - MyApi Properties: ApiStages: - - ApiId: - Ref: MyApi - Stage: - Ref: MyApi.Stage + - ApiId: + Ref: MyApi + Stage: + Ref: MyApi.Stage MyUsagePlanKey: Type: AWS::ApiGateway::UsagePlanKey @@ -214,32 +214,32 @@ Resources: KeyType: API_KEY Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' - - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn - - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn - - CognitoUserPoolTwoArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPoolTwo.Arn - - LambdaAuthInvokeRoleArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: LambdaAuthInvokeRole.Arn - - ApiKeyId: - Description: "ID of the API Key" - Value: - Ref: MyFirstApiKey + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ + + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn + + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn + + CognitoUserPoolTwoArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPoolTwo.Arn + + LambdaAuthInvokeRoleArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: LambdaAuthInvokeRole.Arn + + ApiKeyId: + Description: ID of the API Key + Value: + Ref: MyFirstApiKey diff --git a/integration/resources/templates/combination/api_with_authorizers_min.yaml b/integration/resources/templates/combination/api_with_authorizers_min.yaml index 008b7781f8..43ad01681f 100644 --- a/integration/resources/templates/combination/api_with_authorizers_min.yaml +++ b/integration/resources/templates/combination/api_with_authorizers_min.yaml @@ -17,7 +17,7 @@ Resources: Fn::GetAtt: MyLambdaAuthFunction.Arn Identity: QueryStrings: - - authorization + - authorization MyFunction: Type: AWS::Serverless::Function @@ -75,7 +75,7 @@ Resources: Path: /iam Auth: Authorizer: AWS_IAM - + MyLambdaAuthFunction: Type: AWS::Serverless::Function Properties: @@ -104,7 +104,7 @@ Resources: Type: AWS::Cognito::UserPool Properties: UserPoolName: MyCognitoUserPool - + MyCognitoUserPoolClient: Type: AWS::Cognito::UserPoolClient Properties: @@ -114,17 +114,17 @@ Resources: GenerateSecret: false Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ - AuthorizerFunctionArn: - Description: "Authorizer Function Arn" - Value: - Fn::GetAtt: MyLambdaAuthFunction.Arn + AuthorizerFunctionArn: + Description: Authorizer Function Arn + Value: + Fn::GetAtt: MyLambdaAuthFunction.Arn - CognitoUserPoolArn: - Description: "Cognito User Pool Arn" - Value: - Fn::GetAtt: MyCognitoUserPool.Arn \ No newline at end of file + CognitoUserPoolArn: + Description: Cognito User Pool Arn + Value: + Fn::GetAtt: MyCognitoUserPool.Arn diff --git a/integration/resources/templates/combination/api_with_binary_media_types.yaml b/integration/resources/templates/combination/api_with_binary_media_types.yaml index 6041961330..c7dab6526f 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types.yaml @@ -16,7 +16,6 @@ Resources: StageName: Prod DefinitionUri: ${definitionuri} BinaryMediaTypes: - - image~1jpg - - {"Fn::Join": ["~1", ["image", "png"]]} - - {"Ref": "ImageType"} - + - image~1jpg + - {Fn::Join: [~1, [image, png]]} + - {Ref: ImageType} diff --git a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml index 60597624b1..1c1e2f658b 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body.yaml @@ -13,9 +13,9 @@ Globals: # Send/receive binary data through the APIs BinaryMediaTypes: # These are equivalent to image/gif and image/png when deployed - - image~1jpg - - image~1gif - - image~1png + - image~1jpg + - image~1gif + - image~1png Resources: MyApi: @@ -24,23 +24,23 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy diff --git a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml index 2bdba578e6..07e8b371e1 100644 --- a/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml +++ b/integration/resources/templates/combination/api_with_binary_media_types_with_definition_body_openapi.yaml @@ -15,10 +15,10 @@ Globals: # Send/receive binary data through the APIs BinaryMediaTypes: # These are equivalent to image/gif and image/png when deployed - - image~1jpg - - image~1gif - - image~1png - - application~1octet-stream + - image~1jpg + - image~1gif + - image~1png + - application~1octet-stream OpenApiVersion: 3.0.1 Resources: @@ -28,15 +28,15 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/none" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /none schemes: - - "https" + - https paths: - "/none": + /none: get: x-amazon-apigateway-integration: httpMethod: POST @@ -68,9 +68,9 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ MyLambda: Description: MyLambda Function ARN Value: diff --git a/integration/resources/templates/combination/api_with_cors.yaml b/integration/resources/templates/combination/api_with_cors.yaml index 9be2c0d6e6..aab76c97b1 100644 --- a/integration/resources/templates/combination/api_with_cors.yaml +++ b/integration/resources/templates/combination/api_with_cors.yaml @@ -1,21 +1,21 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: "'methods'" - AllowHeaders: "'headers'" - AllowOrigin: "'origins'" - MaxAge: "'600'" + AllowMethods: "'methods'" + AllowHeaders: "'headers'" + AllowOrigin: "'origins'" + MaxAge: "'600'" Resources: MyLambdaFunction: @@ -43,4 +43,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_cors_only_headers.yaml b/integration/resources/templates/combination/api_with_cors_only_headers.yaml index 1b0bb88879..0843adcb10 100644 --- a/integration/resources/templates/combination/api_with_cors_only_headers.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_headers.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "headers" + Default: headers Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowHeaders: {"Fn::Sub": "'${CorsParam}'"} + AllowHeaders: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_cors_only_max_age.yaml b/integration/resources/templates/combination/api_with_cors_only_max_age.yaml index 5bba7a077a..ac2586877b 100644 --- a/integration/resources/templates/combination/api_with_cors_only_max_age.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_max_age.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "600" + Default: '600' Globals: Api: EndpointConfiguration: REGIONAL Cors: - MaxAge: {"Fn::Sub": "'${CorsParam}'"} + MaxAge: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_cors_only_methods.yaml b/integration/resources/templates/combination/api_with_cors_only_methods.yaml index 4d5e9b286e..1b7c75118b 100644 --- a/integration/resources/templates/combination/api_with_cors_only_methods.yaml +++ b/integration/resources/templates/combination/api_with_cors_only_methods.yaml @@ -1,23 +1,23 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: CorsParam: Type: String - Default: "methods" + Default: methods Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: {"Fn::Sub": "'${CorsParam}'"} + AllowMethods: {Fn::Sub: "'${CorsParam}'"} Resources: MyLambdaFunction: @@ -45,4 +45,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_cors_openapi.yaml b/integration/resources/templates/combination/api_with_cors_openapi.yaml index 9be2c0d6e6..aab76c97b1 100644 --- a/integration/resources/templates/combination/api_with_cors_openapi.yaml +++ b/integration/resources/templates/combination/api_with_cors_openapi.yaml @@ -1,21 +1,21 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Globals: Api: EndpointConfiguration: REGIONAL Cors: - AllowMethods: "'methods'" - AllowHeaders: "'headers'" - AllowOrigin: "'origins'" - MaxAge: "'600'" + AllowMethods: "'methods'" + AllowHeaders: "'headers'" + AllowOrigin: "'origins'" + MaxAge: "'600'" Resources: MyLambdaFunction: @@ -43,4 +43,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_cors_shorthand.yaml b/integration/resources/templates/combination/api_with_cors_shorthand.yaml index f24588057a..05ddfa6a7c 100644 --- a/integration/resources/templates/combination/api_with_cors_shorthand.yaml +++ b/integration/resources/templates/combination/api_with_cors_shorthand.yaml @@ -1,22 +1,22 @@ Conditions: IsChina: Fn::Or: - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-north-1" - - Fn::Equals: - - Ref: "AWS::Region" - - "cn-northwest-1" + - Fn::Equals: + - Ref: AWS::Region + - cn-north-1 + - Fn::Equals: + - Ref: AWS::Region + - cn-northwest-1 Parameters: OriginValue: Type: String - Default: "origins" + Default: origins Globals: Api: EndpointConfiguration: REGIONAL - Cors: {"Fn::Sub": "'${OriginValue}'"} + Cors: {Fn::Sub: "'${OriginValue}'"} Resources: MyLambdaFunction: @@ -44,4 +44,4 @@ Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_custom_domains_edge.yaml b/integration/resources/templates/combination/api_with_custom_domains_edge.yaml index 8072fc2daa..410c11aa17 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_edge.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_edge.yaml @@ -41,8 +41,8 @@ Resources: Ref: MyEdgeDomainCert EndpointConfiguration: EDGE BasePath: - - /get + - /get Route53: HostedZoneId: Ref: HostedZoneId - IpV6: true \ No newline at end of file + IpV6: true diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional.yaml index 779deb0e87..74ee375ba1 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_regional.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_regional.yaml @@ -19,8 +19,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -49,4 +49,4 @@ Resources: Type: Api Properties: Method: Post - Path: /post \ No newline at end of file + Path: /post diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml index 1f73730a2f..d930de7d7c 100644 --- a/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml +++ b/integration/resources/templates/combination/api_with_custom_domains_regional_ownership_verification.yaml @@ -21,8 +21,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId diff --git a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml index 7ef88110dd..ed926269ee 100644 --- a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml +++ b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint.yaml @@ -34,6 +34,6 @@ Resources: Path: / Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml index 3759bc33b1..8d4570e4c3 100644 --- a/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml +++ b/integration/resources/templates/combination/api_with_disable_execute_api_endpoint_openapi_3.yaml @@ -35,6 +35,6 @@ Resources: Path: / Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${RestApiGateway}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_endpoint_configuration.yaml b/integration/resources/templates/combination/api_with_endpoint_configuration.yaml index a4e5cb0ac1..252fa8017c 100644 --- a/integration/resources/templates/combination/api_with_endpoint_configuration.yaml +++ b/integration/resources/templates/combination/api_with_endpoint_configuration.yaml @@ -14,8 +14,5 @@ Resources: Type: AWS::Serverless::Api Properties: StageName: Prod - EndpointConfiguration: { - "Ref": "Config" - } + EndpointConfiguration: {Ref: Config} DefinitionUri: ${definitionuri} - diff --git a/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml b/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml index 4866fa80ea..dfe4971b06 100644 --- a/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml +++ b/integration/resources/templates/combination/api_with_endpoint_configuration_dict.yaml @@ -14,4 +14,3 @@ Resources: EndpointConfiguration: Type: REGIONAL DefinitionUri: ${definitionuri} - diff --git a/integration/resources/templates/combination/api_with_fail_on_warnings.yaml b/integration/resources/templates/combination/api_with_fail_on_warnings.yaml index edc21684a4..27fc522478 100644 --- a/integration/resources/templates/combination/api_with_fail_on_warnings.yaml +++ b/integration/resources/templates/combination/api_with_fail_on_warnings.yaml @@ -28,7 +28,7 @@ Resources: Iam: Type: Api Properties: - RestApiId: + RestApiId: Ref: RestApiGateway Method: GET Path: / diff --git a/integration/resources/templates/combination/api_with_gateway_responses.yaml b/integration/resources/templates/combination/api_with_gateway_responses.yaml index ed301f4d2f..714c925f68 100644 --- a/integration/resources/templates/combination/api_with_gateway_responses.yaml +++ b/integration/resources/templates/combination/api_with_gateway_responses.yaml @@ -33,7 +33,7 @@ Resources: Authorizer: AWS_IAM Outputs: - ApiUrl: - Description: "API endpoint URL for Prod environment" - Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + ApiUrl: + Description: API endpoint URL for Prod environment + Value: + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_method_settings.yaml b/integration/resources/templates/combination/api_with_method_settings.yaml index 53e0e8b11b..0dcb1b5825 100644 --- a/integration/resources/templates/combination/api_with_method_settings.yaml +++ b/integration/resources/templates/combination/api_with_method_settings.yaml @@ -4,10 +4,5 @@ Resources: Properties: StageName: Prod DefinitionUri: ${definitionuri} - MethodSettings: [{ - "LoggingLevel": "INFO", - "MetricsEnabled": True, - "DataTraceEnabled": True, - "ResourcePath": "/*", - "HttpMethod": "*" - }] + MethodSettings: [{LoggingLevel: INFO, MetricsEnabled: true, DataTraceEnabled: true, + ResourcePath: /*, HttpMethod: '*'}] diff --git a/integration/resources/templates/combination/api_with_request_models.yaml b/integration/resources/templates/combination/api_with_request_models.yaml index c275301215..4b61f2b6aa 100644 --- a/integration/resources/templates/combination/api_with_request_models.yaml +++ b/integration/resources/templates/combination/api_with_request_models.yaml @@ -36,6 +36,6 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_request_models_openapi.yaml b/integration/resources/templates/combination/api_with_request_models_openapi.yaml index 4de7f9ee22..d98fa7ab15 100644 --- a/integration/resources/templates/combination/api_with_request_models_openapi.yaml +++ b/integration/resources/templates/combination/api_with_request_models_openapi.yaml @@ -37,6 +37,6 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: 'https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml b/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml index 03113c307a..09ab1e6bef 100644 --- a/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml +++ b/integration/resources/templates/combination/api_with_request_parameters_openapi.yaml @@ -1,13 +1,13 @@ Globals: Api: - OpenApiVersion: '3.0.1' + OpenApiVersion: 3.0.1 CacheClusterEnabled: true CacheClusterSize: '0.5' MethodSettings: - - ResourcePath: /one - HttpMethod: "GET" - CachingEnabled: true - CacheTtlInSeconds: 15 + - ResourcePath: /one + HttpMethod: GET + CachingEnabled: true + CacheTtlInSeconds: 15 Resources: ApiParameterFunction: Type: AWS::Serverless::Function @@ -37,9 +37,9 @@ Resources: Path: /one Method: get RequestParameters: - - method.request.querystring.type: - Required: true - Caching: true + - method.request.querystring.type: + Required: true + Caching: true AnotherGetHtml: Type: Api Properties: diff --git a/integration/resources/templates/combination/api_with_resource_policies.yaml b/integration/resources/templates/combination/api_with_resource_policies.yaml index b260cd5381..d549025041 100644 --- a/integration/resources/templates/combination/api_with_resource_policies.yaml +++ b/integration/resources/templates/combination/api_with_resource_policies.yaml @@ -1,23 +1,19 @@ Conditions: IsChina: Fn::Equals: - - Ref: "AWS::Partition" - - "aws-cn" + - Ref: AWS::Partition + - aws-cn Globals: Api: - OpenApiVersion: "3.0.1" + OpenApiVersion: 3.0.1 Auth: ResourcePolicy: - CustomStatements: [{ - "Effect": "Allow", - "Principal": "*", - "Action": "execute-api:Invoke", - "Resource": "execute-api:*/*/*" - }] - SourceVpcWhitelist: ['vpc-1234'] - SourceVpcBlacklist: ['vpce-5678'] - IpRangeWhitelist: ['1.2.3.4'] + CustomStatements: [{Effect: Allow, Principal: '*', Action: execute-api:Invoke, + Resource: execute-api:*/*/*}] + SourceVpcWhitelist: [vpc-1234] + SourceVpcBlacklist: [vpce-5678] + IpRangeWhitelist: [1.2.3.4] Resources: MyLambdaFunction: @@ -42,21 +38,21 @@ Resources: Outputs: Region: - Description: "Region" - Value: + Description: Region + Value: Ref: AWS::Region AccountId: - Description: "Account Id" - Value: + Description: Account Id + Value: Ref: AWS::AccountId - + Partition: - Description: "Partition" - Value: + Description: Partition + Value: Ref: AWS::Partition ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' \ No newline at end of file + Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ diff --git a/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml b/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml index eb48af1ddd..920ce599e2 100644 --- a/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml +++ b/integration/resources/templates/combination/api_with_resource_policies_aws_account.yaml @@ -11,23 +11,23 @@ Resources: Properties: Auth: ResourcePolicy: - AwsAccountWhitelist: - - Ref: 'AWS::AccountId' + AwsAccountWhitelist: + - Ref: AWS::AccountId Method: get Path: /get Outputs: Region: - Description: "Region" - Value: + Description: Region + Value: Ref: AWS::Region AccountId: - Description: "Account Id" - Value: + Description: Account Id + Value: Ref: AWS::AccountId Partition: - Description: "Partition" - Value: - Ref: AWS::Partition \ No newline at end of file + Description: Partition + Value: + Ref: AWS::Partition diff --git a/integration/resources/templates/combination/api_with_resource_refs.yaml b/integration/resources/templates/combination/api_with_resource_refs.yaml index 6d539f0052..a839b99199 100644 --- a/integration/resources/templates/combination/api_with_resource_refs.yaml +++ b/integration/resources/templates/combination/api_with_resource_refs.yaml @@ -19,4 +19,3 @@ Outputs: DeploymentId: Value: Ref: MyApi.Deployment - diff --git a/integration/resources/templates/combination/api_with_usage_plan.yaml b/integration/resources/templates/combination/api_with_usage_plan.yaml index 6a2f1ca074..ba820119bd 100644 --- a/integration/resources/templates/combination/api_with_usage_plan.yaml +++ b/integration/resources/templates/combination/api_with_usage_plan.yaml @@ -4,9 +4,9 @@ Parameters: Default: PER_API Globals: Api: - OpenApiVersion: "2.0" + OpenApiVersion: '2.0' Auth: - ApiKeyRequired: True + ApiKeyRequired: true UsagePlan: CreateUsagePlan: Ref: UsagePlanType @@ -25,26 +25,26 @@ Resources: StageName: Prod DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 1" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 1 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi2: Type: AWS::Serverless::Api @@ -56,26 +56,26 @@ Resources: CreateUsagePlan: SHARED DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 2" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 2 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi3: Type: AWS::Serverless::Api @@ -87,26 +87,26 @@ Resources: CreateUsagePlan: NONE DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 3" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 3 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy MyApi4: Type: AWS::Serverless::Api @@ -118,26 +118,26 @@ Resources: CreateUsagePlan: SHARED DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0.1" + openapi: 3.0.1 info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api 4" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api 4 + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy Outputs: MyApiUsagePlan: @@ -152,4 +152,3 @@ Outputs: ServerlessApiKey: Value: Ref: ServerlessApiKey - \ No newline at end of file diff --git a/integration/resources/templates/combination/connector_bucket_to_function_write.yaml b/integration/resources/templates/combination/connector_bucket_to_function_write.yaml index b790f5b416..8efc2e0b7b 100644 --- a/integration/resources/templates/combination/connector_bucket_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_bucket_to_function_write.yaml @@ -36,8 +36,8 @@ Resources: BUCKET_NAME: !Ref TriggerBucket VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -57,8 +57,8 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName TriggerBucket: @@ -69,8 +69,8 @@ Resources: BucketName: !Ref BucketName NotificationConfiguration: LambdaConfigurations: - - Event: 's3:ObjectCreated:*' - Function: !GetAtt InvokedFunction.Arn + - Event: s3:ObjectCreated:* + Function: !GetAtt InvokedFunction.Arn MyConnector: Type: AWS::Serverless::Connector @@ -81,7 +81,7 @@ Resources: Destination: Id: InvokedFunction Permissions: - - Write + - Write ConnectorNotTested: Type: AWS::Serverless::Connector @@ -91,5 +91,4 @@ Resources: Destination: Id: TriggerBucket Permissions: - - Write - \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml index f5c28fa4a0..0f7b41a3df 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_eb_custom_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -35,10 +35,10 @@ Resources: EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' EVENT_BUS_NAME: default Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -46,11 +46,11 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt CustomEventBus.Arn - Id: "EBBus" - RoleArn: !GetAtt EBRole.Arn + - Arn: !GetAtt CustomEventBus.Arn + Id: EBBus + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -58,10 +58,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole MyConnector: Type: AWS::Serverless::Connector @@ -71,7 +71,7 @@ Resources: Destination: Id: CustomEventBus Permissions: - - Write + - Write CustomEventBus: Type: AWS::Events::EventBus @@ -85,10 +85,10 @@ Resources: EventBusName: !Ref CustomEventBus EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt VerificationQueue.Arn - Id: "Verification" + - Arn: !GetAtt VerificationQueue.Arn + Id: Verification VerificationQueue: Type: AWS::SQS::Queue @@ -101,4 +101,4 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml index 6c7afd27e3..a6ef67c1df 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_eb_default_write.yaml @@ -35,10 +35,10 @@ Resources: EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' EVENT_BUS_NAME: !Ref CustomEventBus Policies: - - EventBridgePutEventsPolicy: - EventBusName: !Ref CustomEventBus - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: !Ref CustomEventBus + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName CustomEventBus: Type: AWS::Events::EventBus @@ -52,11 +52,11 @@ Resources: EventBusName: !Ref CustomEventBus EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default - Id: "EBBus" - RoleArn: !GetAtt EBRole.Arn + - Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default + Id: EBBus + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -64,10 +64,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole MyConnector: Type: AWS::Serverless::Connector @@ -78,7 +78,7 @@ Resources: Type: AWS::Events::EventBus Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default Permissions: - - Write + - Write VerificationEventRule: Type: AWS::Events::Rule @@ -86,10 +86,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}-verification' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt VerificationQueue.Arn - Id: "SQSqueue" + - Arn: !GetAtt VerificationQueue.Arn + Id: SQSqueue VerificationQueue: Type: AWS::SQS::Queue @@ -102,4 +102,4 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml index 9e1740731b..281d7faf07 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_lambda_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt Function.Arn - Id: "Target" + - Arn: !GetAtt Function.Arn + Id: Target Function: Type: AWS::Serverless::Function @@ -68,8 +68,8 @@ Resources: Variables: QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -82,4 +82,4 @@ Resources: Destination: Id: Function Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml index 4c2306fa96..449d12428c 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sfn_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,11 +44,11 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt StateMachine.Arn - Id: "Target" - RoleArn: !GetAtt EBRole.Arn + - Arn: !GetAtt StateMachine.Arn + Id: Target + RoleArn: !GetAtt EBRole.Arn EBRole: Type: AWS::IAM::Role @@ -56,10 +56,10 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Effect: Allow - Principal: - Service: events.amazonaws.com - Action: sts:AssumeRole + - Effect: Allow + Principal: + Service: events.amazonaws.com + Action: sts:AssumeRole StateMachine: Type: AWS::Serverless::StateMachine @@ -74,10 +74,10 @@ Resources: Parameters: QueueUrl: !Ref VerificationQueue MessageBody: hello - End: True + End: true Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -90,4 +90,4 @@ Resources: Destination: Id: StateMachine Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml index 12fd5f6bfe..120cb717f4 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sns_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !Ref Topic - Id: "Target" + - Arn: !Ref Topic + Id: Target Topic: Type: AWS::SNS::Topic @@ -70,7 +70,7 @@ Resources: Destination: Id: Topic Permissions: - - Write + - Write ConnectorNotBeingTested: Type: AWS::Serverless::Connector @@ -80,4 +80,4 @@ Resources: Destination: Id: VerificationQueue Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml b/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml index a1420a2a39..1ed2e04e1d 100644 --- a/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml +++ b/integration/resources/templates/combination/connector_event_rule_to_sqs_write.yaml @@ -7,7 +7,7 @@ Resources: Timeout: 10 # in case eb has delay InlineCode: | const AWS = require('aws-sdk'); - + exports.handler = async (event) => { const eb = new AWS.EventBridge(); const response = await eb.putEvents({ @@ -33,10 +33,10 @@ Resources: QUEUE_URL: !Ref Queue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - EventBridgePutEventsPolicy: - EventBusName: default - - SQSPollerPolicy: - QueueName: !GetAtt Queue.QueueName + - EventBridgePutEventsPolicy: + EventBusName: default + - SQSPollerPolicy: + QueueName: !GetAtt Queue.QueueName EventRule: Type: AWS::Events::Rule @@ -44,10 +44,10 @@ Resources: Description: !Sub 'EventRule-${AWS::StackName}' EventPattern: source: - - !Sub '${AWS::StackName}-test-event' + - !Sub '${AWS::StackName}-test-event' Targets: - - Arn: !GetAtt Queue.Arn - Id: "SQSqueue" + - Arn: !GetAtt Queue.Arn + Id: SQSqueue Queue: Type: AWS::SQS::Queue @@ -60,4 +60,4 @@ Resources: Destination: Id: Queue Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_function_to_bucket_read.yaml b/integration/resources/templates/combination/connector_function_to_bucket_read.yaml index 6f61b7cae3..b4a41a19b9 100644 --- a/integration/resources/templates/combination/connector_function_to_bucket_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_bucket_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,7 +40,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Bucket Permissions: - - Read \ No newline at end of file + - Read diff --git a/integration/resources/templates/combination/connector_function_to_bucket_write.yaml b/integration/resources/templates/combination/connector_function_to_bucket_write.yaml index 68749fd2b2..3285b11ecb 100644 --- a/integration/resources/templates/combination/connector_function_to_bucket_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_bucket_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -42,7 +42,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Bucket Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml b/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml index a917e3c2f8..4519f0272b 100644 --- a/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_eventbus_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -45,7 +45,7 @@ Resources: EventBus: Type: AWS::Events::EventBus - Properties: + Properties: Name: TestEventBus Connector: @@ -53,7 +53,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: EventBus Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_function_to_function.yaml b/integration/resources/templates/combination/connector_function_to_function.yaml index 14d7b8f28d..be1f2f17de 100644 --- a/integration/resources/templates/combination/connector_function_to_function.yaml +++ b/integration/resources/templates/combination/connector_function_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -65,9 +65,9 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyFunction2 Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_function_to_queue_read.yaml b/integration/resources/templates/combination/connector_function_to_queue_read.yaml index 01fd436db2..4410fca9f8 100644 --- a/integration/resources/templates/combination/connector_function_to_queue_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_queue_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -39,7 +39,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Read \ No newline at end of file + - Read diff --git a/integration/resources/templates/combination/connector_function_to_queue_write.yaml b/integration/resources/templates/combination/connector_function_to_queue_write.yaml index c51c7f1dbb..8d0e6b6adc 100644 --- a/integration/resources/templates/combination/connector_function_to_queue_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_queue_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,7 +40,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_function_to_sfn_read.yaml b/integration/resources/templates/combination/connector_function_to_sfn_read.yaml index 06cb9319d6..3b4f506f79 100644 --- a/integration/resources/templates/combination/connector_function_to_sfn_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_sfn_read.yaml @@ -21,8 +21,8 @@ Resources: Resource: !GetAtt StateMachineFunction.Arn End: true Policies: - - LambdaInvokePolicy: - FunctionName: !Ref StateMachineFunction + - LambdaInvokePolicy: + FunctionName: !Ref StateMachineFunction TriggerFunction: Type: AWS::Serverless::Function @@ -47,9 +47,9 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: StateMachine Permissions: - - Read \ No newline at end of file + - Read diff --git a/integration/resources/templates/combination/connector_function_to_sfn_write.yaml b/integration/resources/templates/combination/connector_function_to_sfn_write.yaml index 3b90f62650..c4d43e9737 100644 --- a/integration/resources/templates/combination/connector_function_to_sfn_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_sfn_write.yaml @@ -21,8 +21,8 @@ Resources: Resource: !GetAtt StateMachineFunction.Arn End: true Policies: - - LambdaInvokePolicy: - FunctionName: !Ref StateMachineFunction + - LambdaInvokePolicy: + FunctionName: !Ref StateMachineFunction TriggerFunction: Type: AWS::Serverless::Function @@ -46,9 +46,9 @@ Resources: MyConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: StateMachine Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_function_to_table_read.yaml b/integration/resources/templates/combination/connector_function_to_table_read.yaml index f7050a7fb1..d18bcfaf3f 100644 --- a/integration/resources/templates/combination/connector_function_to_table_read.yaml +++ b/integration/resources/templates/combination/connector_function_to_table_read.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -40,18 +40,18 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyReadConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyTable Permissions: - - Read + - Read diff --git a/integration/resources/templates/combination/connector_function_to_table_write.yaml b/integration/resources/templates/combination/connector_function_to_table_write.yaml index fccdcfc525..b4bb073784 100644 --- a/integration/resources/templates/combination/connector_function_to_table_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_table_write.yaml @@ -26,18 +26,18 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyWriteConnector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: MyTable Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_function_to_topic_write.yaml b/integration/resources/templates/combination/connector_function_to_topic_write.yaml index 73e9ef9c8a..3ed95a1b21 100644 --- a/integration/resources/templates/combination/connector_function_to_topic_write.yaml +++ b/integration/resources/templates/combination/connector_function_to_topic_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -41,7 +41,7 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_httpapi_to_function.yaml b/integration/resources/templates/combination/connector_httpapi_to_function.yaml index 813410733a..2480390ab7 100644 --- a/integration/resources/templates/combination/connector_httpapi_to_function.yaml +++ b/integration/resources/templates/combination/connector_httpapi_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -37,11 +37,11 @@ Resources: const req = https.get(process.env.API_URL, res => { var body = []; - + res.on('data', function(chunk) { body.push(chunk); }); - + res.on('end', function() { try { const message = JSON.parse(Buffer.concat(body).toString())['message']; @@ -97,7 +97,7 @@ Resources: Properties: ApiId: !Ref HttpApi StageName: prod - AutoDeploy: True + AutoDeploy: true Integration: Type: AWS::ApiGatewayV2::Integration @@ -124,4 +124,4 @@ Resources: Destination: Id: ConnectedFunction Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_restapi_to_function.yaml b/integration/resources/templates/combination/connector_restapi_to_function.yaml index 10a5da1aaa..c293c89552 100644 --- a/integration/resources/templates/combination/connector_restapi_to_function.yaml +++ b/integration/resources/templates/combination/connector_restapi_to_function.yaml @@ -4,24 +4,24 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole MyRole2: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -37,11 +37,11 @@ Resources: const req = https.get(process.env.API_URL, res => { var body = []; - + res.on('data', function(chunk) { body.push(chunk); }); - + res.on('end', function() { try { const message = JSON.parse(Buffer.concat(body).toString())['message']; @@ -94,15 +94,15 @@ Resources: # BJS and gov regions only support REGIONAL endpoints, # using REGIONAL for all regions for simplicity. Types: - - REGIONAL + - REGIONAL Path: Type: AWS::ApiGateway::Resource Properties: RestApiId: !Ref RestApi ParentId: !GetAtt - - RestApi - - RootResourceId + - RestApi + - RootResourceId PathPart: somepath Method: @@ -121,14 +121,14 @@ Resources: RestAPIDeployment: Type: AWS::ApiGateway::Deployment DependsOn: - - Method + - Method Properties: RestApiId: !Ref RestApi RestAPIGatewayStage: Type: AWS::ApiGateway::Stage DependsOn: - - Method + - Method Properties: DeploymentId: !Ref RestAPIDeployment RestApiId: !Ref RestApi @@ -142,4 +142,4 @@ Resources: Destination: Id: ConnectedFunction Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml b/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml index 2f53b2854b..c1b0872f5c 100644 --- a/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_bucket_read.yaml @@ -1,7 +1,7 @@ Resources: Bucket: Type: AWS::S3::Bucket - + TriggerStateMachine: Type: AWS::Serverless::StateMachine @@ -12,13 +12,13 @@ Resources: States: ListBucket: Type: Task - Parameters: + Parameters: Bucket: !Ref Bucket Resource: !Sub "arn:${AWS::Partition}:states:::aws-sdk:s3:listObjectsV2" End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyConnector: Type: AWS::Serverless::Connector @@ -28,4 +28,4 @@ Resources: Destination: Id: Bucket Permissions: - - Read \ No newline at end of file + - Read diff --git a/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml b/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml index 9fa0935c69..794d119d36 100644 --- a/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_bucket_write.yaml @@ -12,14 +12,14 @@ Resources: PutObject: Type: Task Parameters: - "Bucket": !Ref Bucket - "Body": {} - "Key": "MyData" + Bucket: !Ref Bucket + Body: {} + Key: MyData Resource: !Sub "arn:${AWS::Partition}:states:::aws-sdk:s3:putObject" End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyConnector: Type: AWS::Serverless::Connector @@ -29,4 +29,4 @@ Resources: Destination: Id: Bucket Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml b/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml index 9a3617ec6f..e1a4c55aa2 100644 --- a/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_eb_custom_write.yaml @@ -11,15 +11,15 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::events:putEvents Parameters: Entries: - - Detail: - Message: Test - DetailType: Test - EventBusName: !Ref CustomEventBus - Source: !Sub "${AWS::StackName}-source" - End: True + - Detail: + Message: Test + DetailType: Test + EventBusName: !Ref CustomEventBus + Source: !Sub "${AWS::StackName}-source" + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter CustomEventBus: Type: AWS::Events::EventBus @@ -35,4 +35,4 @@ Resources: Type: AWS::Events::EventBus Arn: !GetAtt CustomEventBus.Arn Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml b/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml index cb7d62b17a..4efc620939 100644 --- a/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_eb_default_write.yaml @@ -11,15 +11,15 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::events:putEvents Parameters: Entries: - - Detail: - Message: Test - DetailType: Test - EventBusName: default - Source: !Sub "${AWS::StackName}-source" - End: True + - Detail: + Message: Test + DetailType: Test + EventBusName: default + Source: !Sub "${AWS::StackName}-source" + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -30,4 +30,4 @@ Resources: Type: AWS::Events::EventBus Arn: !Sub arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_function_write.yaml b/integration/resources/templates/combination/connector_sfn_to_function_write.yaml index 8cfbbcbf01..c9da369822 100644 --- a/integration/resources/templates/combination/connector_sfn_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_function_write.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::lambda:invoke Parameters: FunctionName: !Ref MyFunction - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyFunction: Type: AWS::Serverless::Function @@ -34,4 +34,4 @@ Resources: Destination: Id: MyFunction Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml b/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml index 67c27aecf2..a3d6deda3e 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sfn_async.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::states:startExecution Parameters: StateMachineArn: !Ref MyStateMachine - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyStateMachine: Type: AWS::Serverless::StateMachine @@ -26,8 +26,8 @@ Resources: Success: Type: Succeed Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -37,5 +37,5 @@ Resources: Destination: Id: MyStateMachine Permissions: - - Read - - Write + - Read + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml b/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml index e95261755e..746fa83c02 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sfn_sync.yaml @@ -11,10 +11,10 @@ Resources: Resource: !Sub arn:${AWS::Partition}:states:::states:startExecution.sync:2 Parameters: StateMachineArn: !Ref MyStateMachine - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyStateMachine: Type: AWS::Serverless::StateMachine @@ -26,8 +26,8 @@ Resources: Success: Type: Succeed Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyConnector: Type: AWS::Serverless::Connector @@ -37,5 +37,5 @@ Resources: Destination: Id: MyStateMachine Permissions: - - Read - - Write + - Read + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml b/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml index b9378c303a..86b40ce8c6 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sns_write.yaml @@ -12,10 +12,10 @@ Resources: Parameters: TopicArn: !Ref MyTopic Message: hello - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTopic: Type: AWS::SNS::Topic @@ -28,4 +28,4 @@ Resources: Destination: Id: MyTopic Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml b/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml index 8eba7d772e..84860e3953 100644 --- a/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_sqs_write.yaml @@ -12,10 +12,10 @@ Resources: Parameters: QueueUrl: !Ref MyQueue MessageBody: hello - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingDoesNotMatter" + - LambdaInvokePolicy: + FunctionName: SomethingDoesNotMatter MyQueue: Type: AWS::SQS::Queue @@ -28,4 +28,4 @@ Resources: Destination: Id: MyQueue Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sfn_to_table_read.yaml b/integration/resources/templates/combination/connector_sfn_to_table_read.yaml index c4ed38e0e2..4b0f9cd082 100644 --- a/integration/resources/templates/combination/connector_sfn_to_table_read.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_table_read.yaml @@ -14,21 +14,21 @@ Resources: Key: Id: S: some-value - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTable: Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyConnector: Type: AWS::Serverless::Connector @@ -38,4 +38,4 @@ Resources: Destination: Id: MyTable Permissions: - - Read + - Read diff --git a/integration/resources/templates/combination/connector_sfn_to_table_write.yaml b/integration/resources/templates/combination/connector_sfn_to_table_write.yaml index a2d5d31b2b..3e96d73151 100644 --- a/integration/resources/templates/combination/connector_sfn_to_table_write.yaml +++ b/integration/resources/templates/combination/connector_sfn_to_table_write.yaml @@ -14,21 +14,21 @@ Resources: Item: Id: S: some-value - End: True + End: true Policies: - - LambdaInvokePolicy: - FunctionName: "SomethingIsNotStateMachineFunction" + - LambdaInvokePolicy: + FunctionName: SomethingIsNotStateMachineFunction MyTable: Type: AWS::DynamoDB::Table Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH MyConnector: Type: AWS::Serverless::Connector @@ -38,4 +38,4 @@ Resources: Destination: Id: MyTable Permissions: - - Write + - Write diff --git a/integration/resources/templates/combination/connector_sns_to_function_write.yaml b/integration/resources/templates/combination/connector_sns_to_function_write.yaml index caf403a9c9..c51f93fb7d 100644 --- a/integration/resources/templates/combination/connector_sns_to_function_write.yaml +++ b/integration/resources/templates/combination/connector_sns_to_function_write.yaml @@ -3,8 +3,8 @@ Resources: Type: AWS::SNS::Topic Properties: Subscription: - - Endpoint: !GetAtt 'InvokedFunction.Arn' - Protocol: lambda + - Endpoint: !GetAtt 'InvokedFunction.Arn' + Protocol: lambda TriggerFunction: Type: AWS::Serverless::Function @@ -13,32 +13,32 @@ Resources: Handler: index.handler Timeout: 10 # in case eb has delay InlineCode: | - const AWS = require('aws-sdk'); - exports.handler = async (event) => { - var params = { - Message: 'Test Message', - TopicArn: process.env.TOPIC_ARN, - }; - var sns = new AWS.SNS(); - var sqs = new AWS.SQS(); - await sns.publish(params).promise(); - - const data = await sqs.receiveMessage({ - QueueUrl: process.env.VERIFICATION_QUEUE_URL, - WaitTimeSeconds: 5, - }).promise(); - if (data.Messages.length == 0) { - throw 'No messages in the queue!'; - } + const AWS = require('aws-sdk'); + exports.handler = async (event) => { + var params = { + Message: 'Test Message', + TopicArn: process.env.TOPIC_ARN, }; + var sns = new AWS.SNS(); + var sqs = new AWS.SQS(); + await sns.publish(params).promise(); + + const data = await sqs.receiveMessage({ + QueueUrl: process.env.VERIFICATION_QUEUE_URL, + WaitTimeSeconds: 5, + }).promise(); + if (data.Messages.length == 0) { + throw 'No messages in the queue!'; + } + }; Environment: Variables: TOPIC_ARN: !Ref Topic VERIFICATION_QUEUE_URL: !Ref VerificationQueue EVENT_SOURCE: !Sub '${AWS::StackName}-test-event' Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -58,29 +58,28 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName - + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName + VerificationQueue: Type: AWS::SQS::Queue Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Topic - Destination: + Destination: Id: InvokedFunction Permissions: - - Write + - Write ConnectorNotTested: Type: AWS::Serverless::Connector Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write - + - Write diff --git a/integration/resources/templates/combination/connector_sqs_to_function.yaml b/integration/resources/templates/combination/connector_sqs_to_function.yaml index 3db60e904a..20bd33aabd 100644 --- a/integration/resources/templates/combination/connector_sqs_to_function.yaml +++ b/integration/resources/templates/combination/connector_sqs_to_function.yaml @@ -31,10 +31,10 @@ Resources: QUEUE_URL: !Ref Queue VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName - - SQSSendMessagePolicy: - QueueName: !GetAtt Queue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt Queue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -54,17 +54,17 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName SQSEventSourceMapping: Type: AWS::Lambda::EventSourceMapping Properties: FunctionName: !Ref InvokedFunction - EventSourceArn: + EventSourceArn: Fn::GetAtt: - - "Queue" - - "Arn" + - Queue + - Arn BatchSize: 10 VerificationQueue: @@ -73,10 +73,10 @@ Resources: Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Queue - Destination: + Destination: Id: InvokedFunction Permissions: - - Read - - Write \ No newline at end of file + - Read + - Write diff --git a/integration/resources/templates/combination/connector_table_to_function_read.yaml b/integration/resources/templates/combination/connector_table_to_function_read.yaml index d0e435d54c..7fdd126c63 100644 --- a/integration/resources/templates/combination/connector_table_to_function_read.yaml +++ b/integration/resources/templates/combination/connector_table_to_function_read.yaml @@ -37,8 +37,8 @@ Resources: TABLE_NAME: !Ref Table VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSPollerPolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSPollerPolicy: + QueueName: !GetAtt VerificationQueue.QueueName InvokedFunction: Type: AWS::Serverless::Function @@ -58,8 +58,8 @@ Resources: Variables: VERIFICATION_QUEUE_URL: !Ref VerificationQueue Policies: - - SQSSendMessagePolicy: - QueueName: !GetAtt VerificationQueue.QueueName + - SQSSendMessagePolicy: + QueueName: !GetAtt VerificationQueue.QueueName VerificationQueue: Type: AWS::SQS::Queue @@ -69,18 +69,18 @@ Resources: Properties: BillingMode: PAY_PER_REQUEST AttributeDefinitions: - - AttributeName: "Id" - AttributeType: "S" + - AttributeName: Id + AttributeType: S KeySchema: - - AttributeName: "Id" - KeyType: "HASH" + - AttributeName: Id + KeyType: HASH StreamSpecification: StreamViewType: NEW_AND_OLD_IMAGES DynamoDBTableStream: Type: AWS::Lambda::EventSourceMapping Properties: - Enabled: True + Enabled: true EventSourceArn: !GetAtt Table.StreamArn FunctionName: !GetAtt InvokedFunction.Arn StartingPosition: TRIM_HORIZON @@ -88,19 +88,19 @@ Resources: Connector: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: Table - Destination: + Destination: Id: InvokedFunction Permissions: - - Read + - Read ConnectorNotTested: Type: AWS::Serverless::Connector Properties: - Source: + Source: Id: TriggerFunction - Destination: + Destination: Id: Table Permissions: - - Write \ No newline at end of file + - Write diff --git a/integration/resources/templates/combination/connector_topic_to_queue_write.yaml b/integration/resources/templates/combination/connector_topic_to_queue_write.yaml index 8cd430835f..42b4116f19 100644 --- a/integration/resources/templates/combination/connector_topic_to_queue_write.yaml +++ b/integration/resources/templates/combination/connector_topic_to_queue_write.yaml @@ -4,12 +4,12 @@ Resources: Properties: AssumeRolePolicyDocument: Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: lambda.amazonaws.com + - Effect: Allow + Action: sts:AssumeRole + Principal: + Service: lambda.amazonaws.com ManagedPolicyArns: - - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole + - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole TriggerFunction: Type: AWS::Lambda::Function @@ -46,11 +46,11 @@ Resources: Type: AWS::SNS::Topic Properties: Subscription: - - Endpoint: - Fn::GetAtt: - - "Queue" - - "Arn" - Protocol: "sqs" + - Endpoint: + Fn::GetAtt: + - Queue + - Arn + Protocol: sqs Queue: Type: AWS::SQS::Queue @@ -60,27 +60,27 @@ Resources: Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Topic Permissions: - - Write + - Write Connector2: Type: AWS::Serverless::Connector Properties: Source: Id: Topic - Destination: + Destination: Id: Queue Permissions: - - Write + - Write Connector3: Type: AWS::Serverless::Connector Properties: Source: Id: TriggerFunction - Destination: + Destination: Id: Queue Permissions: - - Read \ No newline at end of file + - Read diff --git a/integration/resources/templates/combination/depends_on.yaml b/integration/resources/templates/combination/depends_on.yaml index a3dba05bf6..e0c4ec868f 100644 --- a/integration/resources/templates/combination/depends_on.yaml +++ b/integration/resources/templates/combination/depends_on.yaml @@ -6,46 +6,42 @@ Resources: # https://github.com/awslabs/serverless-application-model/issues/68#issuecomment-276495326 MyLambdaFunction: - Type: "AWS::Serverless::Function" + Type: AWS::Serverless::Function DependsOn: LambdaRolePolicy Properties: Role: - "Fn::GetAtt": LambdaRole.Arn + Fn::GetAtt: LambdaRole.Arn Handler: lambda_function.lambda_handler Runtime: python3.8 Timeout: 15 CodeUri: ${codeuri} LambdaRole: - Type: "AWS::IAM::Role" + Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: - Version: "2012-10-17" + Version: '2012-10-17' Statement: - - - Effect: "Allow" - Action: - - "sts:AssumeRole" - Principal: - Service: - - "lambda.amazonaws.com" + - Effect: Allow + Action: + - sts:AssumeRole + Principal: + Service: + - lambda.amazonaws.com LambdaRolePolicy: - Type: "AWS::IAM::Policy" + Type: AWS::IAM::Policy Properties: - PolicyName: "LambdaRolePolicy" + PolicyName: LambdaRolePolicy PolicyDocument: - Version: "2012-10-17" + Version: '2012-10-17' Statement: - - - Effect: "Allow" - Action: - - "logs:CreateLogGroup" - - "logs:CreateLogStream" - - "logs:PutLogEvents" - Resource: - - "*" + - Effect: Allow + Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents + Resource: + - '*' Roles: - - - Ref: "LambdaRole" - + - Ref: LambdaRole diff --git a/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml b/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml index 9be1901146..b5efc07556 100644 --- a/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml +++ b/integration/resources/templates/combination/function_with_alias_and_event_sources.yaml @@ -4,7 +4,7 @@ Resources: MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -16,7 +16,7 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) CWEvent: Type: CloudWatchEvent @@ -57,7 +57,7 @@ Resources: Type: Kinesis Properties: Stream: - Fn::GetAtt: ["Stream", "Arn"] + Fn::GetAtt: [Stream, Arn] BatchSize: 100 StartingPosition: TRIM_HORIZON @@ -65,7 +65,7 @@ Resources: Type: DynamoDB Properties: Stream: - Fn::GetAtt: ["MyTable", "StreamArn"] + Fn::GetAtt: [MyTable, StreamArn] BatchSize: 200 StartingPosition: LATEST @@ -78,7 +78,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev DefinitionUri: ${definitionuri} Stream: @@ -103,4 +103,3 @@ Resources: KeySchema: - KeyType: HASH AttributeName: id - diff --git a/integration/resources/templates/combination/function_with_alias_intrinsics.yaml b/integration/resources/templates/combination/function_with_alias_intrinsics.yaml index 7f3fc7baa0..1d8c8cfbdb 100644 --- a/integration/resources/templates/combination/function_with_alias_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_alias_intrinsics.yaml @@ -1,18 +1,18 @@ Parameters: - Bucket: - Type: String - CodeKey: - Type: String - SwaggerKey: - Type: String - AliasName: - Type: String - Default: Live + Bucket: + Type: String + CodeKey: + Type: String + SwaggerKey: + Type: String + AliasName: + Type: String + Default: Live Globals: Function: AutoPublishAlias: - Ref: AliasName + Ref: AliasName Resources: MyLambdaFunction: @@ -23,7 +23,7 @@ Resources: CodeUri: # Just trying to create a complex intrinsic function where only a part of it can be resolved Bucket: - Fn::Join: ["", [{Ref: Bucket}]] + Fn::Join: ['', [Ref: Bucket]] Key: # Even though the entire Sub won't be resolved, translator will substitute ${Key} with value passed at runtime - Fn::Sub: "${CodeKey}" + Fn::Sub: ${CodeKey} diff --git a/integration/resources/templates/combination/function_with_all_event_types.yaml b/integration/resources/templates/combination/function_with_all_event_types.yaml index ae6897e348..96c533593b 100644 --- a/integration/resources/templates/combination/function_with_all_event_types.yaml +++ b/integration/resources/templates/combination/function_with_all_event_types.yaml @@ -7,8 +7,8 @@ Parameters: Conditions: MyCondition: Fn::Equals: - - true - - true + - true + - true Resources: @@ -30,7 +30,7 @@ Resources: # All Event Types MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: InlineCode: | @@ -42,11 +42,11 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Name: Ref: ScheduleName Description: test schedule - Enabled: False + Enabled: false CWEvent: Type: CloudWatchEvent @@ -126,15 +126,15 @@ Resources: ShardCount: 1 MyDynamoDB: - Type: 'AWS::DynamoDB::Table' + Type: AWS::DynamoDB::Table Condition: MyCondition Properties: AttributeDefinitions: - - AttributeName: id - AttributeType: S + - AttributeName: id + AttributeType: S KeySchema: - - AttributeName: id - KeyType: HASH + - AttributeName: id + KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 diff --git a/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml b/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml index 10335a4ee9..5a360c7a76 100644 --- a/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml +++ b/integration/resources/templates/combination/function_with_all_event_types_condition_false.yaml @@ -2,8 +2,8 @@ AWSTemplateFormatVersion: '2010-09-09' Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: @@ -25,7 +25,7 @@ Resources: # All Event Types MyAwesomeFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: InlineCode: | @@ -37,7 +37,7 @@ Resources: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) CWEvent: Type: CloudWatchEvent @@ -115,17 +115,17 @@ Resources: ShardCount: 1 MyDynamoDB: - Type: 'AWS::DynamoDB::Table' + Type: AWS::DynamoDB::Table Condition: MyCondition Properties: AttributeDefinitions: - - AttributeName: id - AttributeType: S + - AttributeName: id + AttributeType: S KeySchema: - - AttributeName: id - KeyType: HASH + - AttributeName: id + KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 StreamSpecification: - StreamViewType: NEW_IMAGE \ No newline at end of file + StreamViewType: NEW_IMAGE diff --git a/integration/resources/templates/combination/function_with_api.yaml b/integration/resources/templates/combination/function_with_api.yaml index 8ad44c5a5d..f4db996c25 100644 --- a/integration/resources/templates/combination/function_with_api.yaml +++ b/integration/resources/templates/combination/function_with_api.yaml @@ -4,7 +4,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev DefinitionUri: ${definitionuri} MyLambdaFunction: diff --git a/integration/resources/templates/combination/function_with_application.yaml b/integration/resources/templates/combination/function_with_application.yaml index 4dd90743dc..0510fd7963 100644 --- a/integration/resources/templates/combination/function_with_application.yaml +++ b/integration/resources/templates/combination/function_with_application.yaml @@ -1,12 +1,12 @@ Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunctionWithApplication: @@ -18,7 +18,7 @@ Resources: Environment: Variables: TABLE_NAME: - Fn::GetAtt: ["MyNestedApp", "Outputs.TableName"] + Fn::GetAtt: [MyNestedApp, Outputs.TableName] MyNestedApp: Type: AWS::Serverless::Application @@ -30,4 +30,4 @@ Resources: Type: AWS::Serverless::Application Condition: FalseCondition Properties: - Location: ${templateurl} \ No newline at end of file + Location: ${templateurl} diff --git a/integration/resources/templates/combination/function_with_cloudwatch_log.yaml b/integration/resources/templates/combination/function_with_cloudwatch_log.yaml index 6ed04eaa3b..86ae49910a 100644 --- a/integration/resources/templates/combination/function_with_cloudwatch_log.yaml +++ b/integration/resources/templates/combination/function_with_cloudwatch_log.yaml @@ -1,6 +1,6 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs14.x @@ -13,8 +13,8 @@ Resources: LogGroupName: Ref: CloudWatchLambdaLogsGroup FilterPattern: My filter pattern - + CloudWatchLambdaLogsGroup: Type: AWS::Logs::LogGroup Properties: - RetentionInDays: 7 \ No newline at end of file + RetentionInDays: 7 diff --git a/integration/resources/templates/combination/function_with_custom_code_deploy.yaml b/integration/resources/templates/combination/function_with_custom_code_deploy.yaml index a3d24e1186..7cddff2e07 100644 --- a/integration/resources/templates/combination/function_with_custom_code_deploy.yaml +++ b/integration/resources/templates/combination/function_with_custom_code_deploy.yaml @@ -6,7 +6,7 @@ Parameters: Resources: MyLambdaFunction: DependsOn: CustomDeploymentConfig - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -18,7 +18,7 @@ Resources: Type: Ref: CustomDeploymentConfig Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] DeploymentRole: Type: AWS::IAM::Role @@ -34,21 +34,19 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish CustomDeploymentConfig: Type: AWS::CodeDeploy::DeploymentConfig @@ -60,4 +58,4 @@ Resources: Type: TimeBasedLinear TimeBasedLinear: LinearInterval: 1 - LinearPercentage: 50 \ No newline at end of file + LinearPercentage: 50 diff --git a/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml index 3941cd133a..3d64b25562 100644 --- a/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/function_with_cwe_dlq_and_retry_policy.yaml @@ -24,23 +24,23 @@ Resources: DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn Outputs: MyLambdaArn: - Description: "Arn of the Lambda target" + Description: Arn of the Lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyLambdaFunctionCWEvent MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn diff --git a/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml b/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml index 2fe0ea53cc..5913aac604 100644 --- a/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml +++ b/integration/resources/templates/combination/function_with_cwe_dlq_generated.yaml @@ -24,23 +24,22 @@ Resources: Outputs: MyLambdaArn: - Description: "Arn of the Lambda target" + Description: Arn of the Lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyEventName: - Description: "Name of the CWE rule created" + Description: Name of the CWE rule created Value: Ref: MyLambdaFunctionCWEvent MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDlq" - - "Arn" + - MyDlq + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue provided for the CWE rule target" + Description: Url of the dead-letter queue provided for the CWE rule target Value: Ref: MyDlq - diff --git a/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml b/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml index ef127bb0f2..2555f031c4 100644 --- a/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml +++ b/integration/resources/templates/combination/function_with_deployment_alarms_and_hooks.yaml @@ -1,128 +1,126 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - - AutoPublishAlias: Live - - DeploymentPreference: - Role: - Fn::GetAtt: [ DeploymentRole, Arn ] - Type: Canary10Percent5Minutes - Alarms: - - {"Ref": "NewVersionErrorsAlarm"} - - {"Ref": "AliasErrorsAlarm"} - - {"Ref": "FunctionErrorsAlarm"} + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + + AutoPublishAlias: Live + + DeploymentPreference: + Role: + Fn::GetAtt: [DeploymentRole, Arn] + Type: Canary10Percent5Minutes + Alarms: + - {Ref: NewVersionErrorsAlarm} + - {Ref: AliasErrorsAlarm} + - {Ref: FunctionErrorsAlarm} # Hooks: # These hooks just hang so we're commenting them out for now or the deployment waits on them forever # PreTraffic: {"Ref": "PreTrafficFunction"} # PostTraffic: {"Ref": "PostTrafficFunction"} - DeploymentRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Action: - - sts:AssumeRole - Effect: Allow - Principal: - Service: - - codedeploy.amazonaws.com - - Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" - - FunctionErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 - - AliasErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - Name: Alias - Value: Live - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 + DeploymentRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Action: + - sts:AssumeRole + Effect: Allow + Principal: + Service: + - codedeploy.amazonaws.com + + Policies: + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish + + FunctionErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 + + AliasErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + - Name: Alias + Value: Live + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 # Alarm pointing to the Errors metric on "latest" executed function version # When the deployment is happening, this alarm will point to the new version that ie being deployed - NewVersionErrorsAlarm: - Type: AWS::CloudWatch::Alarm - Properties: - Namespace: AWS/Lambda - MetricName: Error - - Dimensions: - - Name: FunctionName - Value: - "Fn::GetAtt": ["MyLambdaFunction", "Arn"] - - - Name: Alias - Value: Live - - - Name: ExecutedVersion - Value: - "Fn::GetAtt": ["MyLambdaFunction.Version", "Version"] - - Statistic: Maximum - Period: 60 - EvaluationPeriods: 5 - ComparisonOperator: GreaterThanOrEqualToThreshold - Threshold: 1.0 - - PreTrafficFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - - PostTrafficFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} \ No newline at end of file + NewVersionErrorsAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + Namespace: AWS/Lambda + MetricName: Error + + Dimensions: + - Name: FunctionName + Value: + Fn::GetAtt: [MyLambdaFunction, Arn] + + - Name: Alias + Value: Live + + - Name: ExecutedVersion + Value: + Fn::GetAtt: [MyLambdaFunction.Version, Version] + + Statistic: Maximum + Period: 60 + EvaluationPeriods: 5 + ComparisonOperator: GreaterThanOrEqualToThreshold + Threshold: 1.0 + + PreTrafficFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + + PostTrafficFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} diff --git a/integration/resources/templates/combination/function_with_deployment_basic.yaml b/integration/resources/templates/combination/function_with_deployment_basic.yaml index b89c09ff39..e6a9228c7a 100644 --- a/integration/resources/templates/combination/function_with_deployment_basic.yaml +++ b/integration/resources/templates/combination/function_with_deployment_basic.yaml @@ -1,7 +1,7 @@ # Just one function with a deployment preference Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -12,7 +12,7 @@ Resources: DeploymentPreference: Type: AllAtOnce Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] DeploymentRole: Type: AWS::IAM::Role @@ -28,18 +28,16 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish diff --git a/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml b/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml index 9d8e637c93..54cf4a99d4 100644 --- a/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml +++ b/integration/resources/templates/combination/function_with_deployment_default_role_managed_policy.yaml @@ -1,6 +1,6 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler diff --git a/integration/resources/templates/combination/function_with_deployment_disabled.yaml b/integration/resources/templates/combination/function_with_deployment_disabled.yaml index 51bb3d188f..60098f239c 100644 --- a/integration/resources/templates/combination/function_with_deployment_disabled.yaml +++ b/integration/resources/templates/combination/function_with_deployment_disabled.yaml @@ -8,7 +8,7 @@ Parameters: Type: String Enabled: Type: String - Default: False + Default: false Resources: MyLambdaFunction: @@ -23,7 +23,7 @@ Resources: DeploymentPreference: Type: AllAtOnce Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] Enabled: Ref: Enabled @@ -42,18 +42,16 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish diff --git a/integration/resources/templates/combination/function_with_deployment_globals.yaml b/integration/resources/templates/combination/function_with_deployment_globals.yaml index 03adf56cad..7869f79b95 100644 --- a/integration/resources/templates/combination/function_with_deployment_globals.yaml +++ b/integration/resources/templates/combination/function_with_deployment_globals.yaml @@ -8,11 +8,11 @@ Globals: Type: Ref: TypeParam Role: - Fn::GetAtt: [ DeploymentRole, Arn ] + Fn::GetAtt: [DeploymentRole, Arn] Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: index.handler @@ -33,18 +33,16 @@ Resources: - codedeploy.amazonaws.com Policies: - - - PolicyName: "root" - PolicyDocument: - Version: "2012-10-17" - Statement: - - - Effect: "Allow" - Resource: "*" - Action: - - "cloudwatch:DescribeAlarms" - - "lambda:UpdateAlias" - - "lambda:GetAlias" - - "lambda:InvokeFunction" - - "s3:Get*" - - "sns:Publish" + - PolicyName: root + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Resource: '*' + Action: + - cloudwatch:DescribeAlarms + - lambda:UpdateAlias + - lambda:GetAlias + - lambda:InvokeFunction + - s3:Get* + - sns:Publish diff --git a/integration/resources/templates/combination/function_with_dynamodb.yaml b/integration/resources/templates/combination/function_with_dynamodb.yaml index 0a9b8d29bf..c7681e52c1 100644 --- a/integration/resources/templates/combination/function_with_dynamodb.yaml +++ b/integration/resources/templates/combination/function_with_dynamodb.yaml @@ -19,24 +19,21 @@ Resources: StartingPosition: TRIM_HORIZON TumblingWindowInSeconds: 120 FunctionResponseTypes: - - ReportBatchItemFailures + - ReportBatchItemFailures MyTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - - { AttributeName : id, AttributeType : S } + - {AttributeName: id, AttributeType: S} KeySchema: - - { "AttributeName" : "id", "KeyType" : "HASH"} + - {AttributeName: id, KeyType: HASH} ProvisionedThroughput: - ReadCapacityUnits: "5" - WriteCapacityUnits: "5" + ReadCapacityUnits: '5' + WriteCapacityUnits: '5' StreamSpecification: - StreamViewType: "NEW_IMAGE" - - - + StreamViewType: NEW_IMAGE diff --git a/integration/resources/templates/combination/function_with_file_system_config.yaml b/integration/resources/templates/combination/function_with_file_system_config.yaml index b03c84d6ac..24e6ec1dcb 100644 --- a/integration/resources/templates/combination/function_with_file_system_config.yaml +++ b/integration/resources/templates/combination/function_with_file_system_config.yaml @@ -18,8 +18,7 @@ Resources: SubnetId: Ref: PreCreatedSubnetOne SecurityGroups: - - - Fn::GetAtt: MySecurityGroup.GroupId + - Fn::GetAtt: MySecurityGroup.GroupId AccessPoint: Type: AWS::EFS::AccessPoint @@ -47,19 +46,17 @@ Resources: Timeout: 3 VpcConfig: SecurityGroupIds: - - - Fn::GetAtt: MySecurityGroup.GroupId + - Fn::GetAtt: MySecurityGroup.GroupId SubnetIds: - - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne FileSystemConfigs: - - Arn: - Fn::GetAtt: AccessPoint.Arn - LocalMountPath: /mnt/EFS + - Arn: + Fn::GetAtt: AccessPoint.Arn + LocalMountPath: /mnt/EFS MySecurityGroup: - Type: "AWS::EC2::SecurityGroup" + Type: AWS::EC2::SecurityGroup Properties: - GroupDescription: "my test group" + GroupDescription: my test group VpcId: Ref: PreCreatedVpc diff --git a/integration/resources/templates/combination/function_with_http_api.yaml b/integration/resources/templates/combination/function_with_http_api.yaml index f275e2969d..600311565e 100644 --- a/integration/resources/templates/combination/function_with_http_api.yaml +++ b/integration/resources/templates/combination/function_with_http_api.yaml @@ -12,7 +12,7 @@ Resources: GetApi: Type: HttpApi Properties: - ApiId: + ApiId: Ref: MyApi Method: GET Path: /some/path @@ -26,12 +26,12 @@ Resources: title: Ref: AWS::StackName paths: - "/some/path": {} - "/other": {} + /some/path: {} + /other: {} openapi: 3.0.1 Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ diff --git a/integration/resources/templates/combination/function_with_http_api_default_path.yaml b/integration/resources/templates/combination/function_with_http_api_default_path.yaml index 5f8e903bc3..c40c33795e 100644 --- a/integration/resources/templates/combination/function_with_http_api_default_path.yaml +++ b/integration/resources/templates/combination/function_with_http_api_default_path.yaml @@ -28,12 +28,12 @@ Resources: paths: /$default: x-amazon-apigateway-any-method: - responses: { } + responses: {} isDefaultRoute: true openapi: 3.0.1 Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${MyApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ diff --git a/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml b/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml index 0f27dc92df..ac23e0e4d6 100644 --- a/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml +++ b/integration/resources/templates/combination/function_with_implicit_api_and_conditions.yaml @@ -3,52 +3,52 @@ Description: A template to test for implicit API condition handling. Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Cond: Fn::Equals: - - true - - false + - true + - false Cond1: Fn::Equals: - - true - - false + - true + - false Cond2: Fn::Equals: - - true - - false + - true + - false Cond3: Fn::Equals: - - true - - false + - true + - false Cond4: Fn::Equals: - - true - - true + - true + - true Cond5: Fn::Equals: - - true - - false + - true + - false Cond6: Fn::Equals: - - true - - true + - true + - true Cond7: Fn::Equals: - - true - - false + - true + - false Cond8: Fn::Equals: - - true - - true + - true + - true Cond9: Fn::Equals: - - true - - false + - true + - false Resources: hello: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: MyCondition Properties: Handler: index.handler @@ -64,7 +64,7 @@ Resources: Path: /sub Method: get helloworld: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond Properties: Handler: index.handler @@ -80,7 +80,7 @@ Resources: Path: /sub Method: post helloworld1: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond1 Properties: Handler: index.handler @@ -96,7 +96,7 @@ Resources: Path: /sub1 Method: post helloworld2: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond2 Properties: Handler: index.handler @@ -112,7 +112,7 @@ Resources: Path: /sub2 Method: post helloworld3: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond3 Properties: Handler: index.handler @@ -128,7 +128,7 @@ Resources: Path: /sub3 Method: post helloworld4: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond4 Properties: Handler: index.handler @@ -144,7 +144,7 @@ Resources: Path: /sub4 Method: post helloworld5: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond5 Properties: Handler: index.handler @@ -160,7 +160,7 @@ Resources: Path: /sub5 Method: post helloworld6: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond6 Properties: Handler: index.handler @@ -176,7 +176,7 @@ Resources: Path: /sub6 Method: post helloworld7: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond7 Properties: Handler: index.handler @@ -192,7 +192,7 @@ Resources: Path: /sub7 Method: post helloworld8: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond8 Properties: Handler: index.handler @@ -208,7 +208,7 @@ Resources: Path: /sub8 Method: post helloworld9: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: Cond9 Properties: Handler: index.handler @@ -222,4 +222,4 @@ Resources: Type: Api Properties: Path: /sub9 - Method: post \ No newline at end of file + Method: post diff --git a/integration/resources/templates/combination/function_with_implicit_http_api.yaml b/integration/resources/templates/combination/function_with_implicit_http_api.yaml index 4b585a3c83..e00beddcfc 100644 --- a/integration/resources/templates/combination/function_with_implicit_http_api.yaml +++ b/integration/resources/templates/combination/function_with_implicit_http_api.yaml @@ -15,6 +15,6 @@ Resources: Outputs: ApiUrl: - Description: "API endpoint URL for Prod environment" + Description: API endpoint URL for Prod environment Value: - Fn::Sub: "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/" \ No newline at end of file + Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/ diff --git a/integration/resources/templates/combination/function_with_kinesis.yaml b/integration/resources/templates/combination/function_with_kinesis.yaml index a62c3c722c..dc963a8078 100644 --- a/integration/resources/templates/combination/function_with_kinesis.yaml +++ b/integration/resources/templates/combination/function_with_kinesis.yaml @@ -19,7 +19,7 @@ Resources: StartingPosition: LATEST TumblingWindowInSeconds: 120 FunctionResponseTypes: - - ReportBatchItemFailures + - ReportBatchItemFailures MyStream: Type: AWS::Kinesis::Stream diff --git a/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml b/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml index 002aafe166..a233a80f59 100644 --- a/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_kinesis_intrinsics.yaml @@ -18,12 +18,12 @@ Parameters: Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -42,16 +42,16 @@ Resources: Ref: IntValue BisectBatchOnFunctionError: Fn::If: - - FalseCondition - - True - - False + - FalseCondition + - true + - false Enabled: Fn::If: - - TrueCondition - - True - - False + - TrueCondition + - true + - false FunctionResponseTypes: - - Ref: FunctionResponseTypesValue + - Ref: FunctionResponseTypesValue MaximumBatchingWindowInSeconds: Ref: One MaximumRecordAgeInSeconds: @@ -65,15 +65,15 @@ Resources: Stream: # Connect with the stream we have created in this template Fn::Join: - - '' - - - 'arn:' - - Ref: AWS::Partition - - ':kinesis:' - - Ref: AWS::Region - - ':' - - Ref: AWS::AccountId - - ':stream/' - - Ref: MyStream + - '' + - - 'arn:' + - Ref: AWS::Partition + - ':kinesis:' + - Ref: AWS::Region + - ':' + - Ref: AWS::AccountId + - :stream/ + - Ref: MyStream TumblingWindowInSeconds: Ref: IntValue MyStream: diff --git a/integration/resources/templates/combination/function_with_layer.yaml b/integration/resources/templates/combination/function_with_layer.yaml index 8ca4ea362e..166b14eac1 100644 --- a/integration/resources/templates/combination/function_with_layer.yaml +++ b/integration/resources/templates/combination/function_with_layer.yaml @@ -1,12 +1,12 @@ Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunctionWithLayer: @@ -16,8 +16,7 @@ Resources: Runtime: nodejs14.x CodeUri: ${codeuri} Layers: - - - Ref: MyLambdaLayer + - Ref: MyLambdaLayer MyLambdaLayer: Type: AWS::Serverless::LayerVersion @@ -35,5 +34,5 @@ Resources: Outputs: MyLambdaLayerArn: - Value: - Ref: MyLambdaLayer \ No newline at end of file + Value: + Ref: MyLambdaLayer diff --git a/integration/resources/templates/combination/function_with_mq.yaml b/integration/resources/templates/combination/function_with_mq.yaml index bc5019fc0e..bc5d796d22 100644 --- a/integration/resources/templates/combination/function_with_mq.yaml +++ b/integration/resources/templates/combination/function_with_mq.yaml @@ -37,7 +37,7 @@ Resources: Properties: RouteTableId: Ref: RouteTable - DestinationCidrBlock: '0.0.0.0/0' + DestinationCidrBlock: 0.0.0.0/0 GatewayId: Ref: PreCreatedInternetGateway @@ -57,26 +57,26 @@ Resources: VpcId: Ref: PreCreatedVpc SecurityGroupIngress: - - IpProtocol: tcp - FromPort: 8162 - ToPort: 8162 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61617 - ToPort: 61617 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 5671 - ToPort: 5671 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61614 - ToPort: 61614 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 8883 - ToPort: 8883 - CidrIp: '0.0.0.0/0' + - IpProtocol: tcp + FromPort: 8162 + ToPort: 8162 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61617 + ToPort: 61617 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 5671 + ToPort: 5671 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61614 + ToPort: 61614 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 8883 + ToPort: 8883 + CidrIp: 0.0.0.0/0 MyLambdaExecutionRole: Type: AWS::IAM::Role @@ -84,37 +84,26 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Action: ['sts:AssumeRole'] - Effect: Allow - Principal: - Service: [lambda.amazonaws.com] + - Action: [sts:AssumeRole] + Effect: Allow + Principal: + Service: [lambda.amazonaws.com] Policies: - - PolicyName: IntegrationTestExecution - PolicyDocument: - Statement: - - Action: [ 'ec2:CreateNetworkInterface', - 'ec2:CreateNetworkInterfacePermission', - 'ec2:DeleteNetworkInterface', - 'ec2:DeleteNetworkInterfacePermission', - 'ec2:DetachNetworkInterface', - 'ec2:DescribeSubnets', - 'ec2:DescribeNetworkInterfaces', - 'ec2:DescribeVpcs', - 'ec2:DescribeInternetGateways', - 'ec2:DescribeNetworkInterfacePermissions', - 'ec2:DescribeSecurityGroups', - 'ec2:DescribeRouteTables', - 'logs:CreateLogGroup', - 'logs:CreateLogStream', - 'logs:PutLogEvents', - 'kms:Decrypt', - 'mq:DescribeBroker', - 'secretsmanager:GetSecretValue'] - Effect: Allow - Resource: '*' - ManagedPolicyArns: ['arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'] + - PolicyName: IntegrationTestExecution + PolicyDocument: + Statement: + - Action: [ec2:CreateNetworkInterface, ec2:CreateNetworkInterfacePermission, + ec2:DeleteNetworkInterface, ec2:DeleteNetworkInterfacePermission, ec2:DetachNetworkInterface, + ec2:DescribeSubnets, ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, + ec2:DescribeInternetGateways, ec2:DescribeNetworkInterfacePermissions, + ec2:DescribeSecurityGroups, ec2:DescribeRouteTables, logs:CreateLogGroup, + logs:CreateLogStream, logs:PutLogEvents, kms:Decrypt, mq:DescribeBroker, + secretsmanager:GetSecretValue] + Effect: Allow + Resource: '*' + ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] Tags: - - {Value: SAM, Key: 'lambda:createdBy'} + - {Value: SAM, Key: lambda:createdBy} MyMqBroker: Properties: @@ -130,17 +119,17 @@ Resources: PubliclyAccessible: true AutoMinorVersionUpgrade: false SecurityGroups: - - Ref: MQSecurityGroup + - Ref: MQSecurityGroup SubnetIds: - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne Users: - - ConsoleAccess: true - Groups: - - admin - Username: - Ref: MQBrokerUser - Password: - Ref: MQBrokerPassword + - ConsoleAccess: true + Groups: + - admin + Username: + Ref: MQBrokerUser + Password: + Ref: MQBrokerPassword Type: AWS::AmazonMQ::Broker DependsOn: MyLambdaExecutionRole @@ -151,7 +140,7 @@ Resources: Handler: index.handler CodeUri: ${codeuri} Role: - Fn::GetAtt: [ MyLambdaExecutionRole, Arn ] + Fn::GetAtt: [MyLambdaExecutionRole, Arn] Events: MyMqEvent: Type: MQ @@ -159,11 +148,11 @@ Resources: Broker: Fn::GetAtt: MyMqBroker.Arn Queues: - - "TestQueue" + - TestQueue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: MQBrokerUserSecret + - Type: BASIC_AUTH + URI: + Ref: MQBrokerUserSecret MQBrokerUserSecret: Type: AWS::SecretsManager::Secret @@ -172,4 +161,4 @@ Resources: Ref: MQBrokerUserSecretName SecretString: Fn::Sub: '{"username":"${MQBrokerUser}","password":"${MQBrokerPassword}"}' - Description: SecretsManager Secret for broker user and password \ No newline at end of file + Description: SecretsManager Secret for broker user and password diff --git a/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml b/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml index 2f7d619482..454a2508c0 100644 --- a/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml +++ b/integration/resources/templates/combination/function_with_mq_using_autogen_role.yaml @@ -37,7 +37,7 @@ Resources: Properties: RouteTableId: Ref: RouteTable - DestinationCidrBlock: '0.0.0.0/0' + DestinationCidrBlock: 0.0.0.0/0 GatewayId: Ref: PreCreatedInternetGateway @@ -57,26 +57,26 @@ Resources: VpcId: Ref: PreCreatedVpc SecurityGroupIngress: - - IpProtocol: tcp - FromPort: 8162 - ToPort: 8162 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61617 - ToPort: 61617 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 5671 - ToPort: 5671 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 61614 - ToPort: 61614 - CidrIp: '0.0.0.0/0' - - IpProtocol: tcp - FromPort: 8883 - ToPort: 8883 - CidrIp: '0.0.0.0/0' + - IpProtocol: tcp + FromPort: 8162 + ToPort: 8162 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61617 + ToPort: 61617 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 5671 + ToPort: 5671 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 61614 + ToPort: 61614 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 8883 + ToPort: 8883 + CidrIp: 0.0.0.0/0 MyMqBroker: Properties: @@ -92,17 +92,17 @@ Resources: PubliclyAccessible: true AutoMinorVersionUpgrade: false SecurityGroups: - - Ref: MQSecurityGroup + - Ref: MQSecurityGroup SubnetIds: - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetTwo Users: - - ConsoleAccess: true - Groups: - - admin - Username: - Ref: MQBrokerUser - Password: - Ref: MQBrokerPassword + - ConsoleAccess: true + Groups: + - admin + Username: + Ref: MQBrokerUser + Password: + Ref: MQBrokerPassword Type: AWS::AmazonMQ::Broker MyLambdaFunction: @@ -118,11 +118,11 @@ Resources: Broker: Fn::GetAtt: MyMqBroker.Arn Queues: - - "TestQueue" + - TestQueue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: MQBrokerUserSecret + - Type: BASIC_AUTH + URI: + Ref: MQBrokerUserSecret MQBrokerUserSecret: Type: AWS::SecretsManager::Secret diff --git a/integration/resources/templates/combination/function_with_msk.yaml b/integration/resources/templates/combination/function_with_msk.yaml index c06aab4ea7..d78af54604 100644 --- a/integration/resources/templates/combination/function_with_msk.yaml +++ b/integration/resources/templates/combination/function_with_msk.yaml @@ -13,38 +13,31 @@ Resources: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - - Action: ['sts:AssumeRole'] + - Action: [sts:AssumeRole] Effect: Allow Principal: Service: [lambda.amazonaws.com] Policies: - - PolicyName: IntegrationTestExecution - PolicyDocument: - Statement: - - Action: [ 'kafka:DescribeCluster', - 'kafka:GetBootstrapBrokers', - 'ec2:CreateNetworkInterface', - 'ec2:DescribeNetworkInterfaces', - 'ec2:DescribeVpcs', - 'ec2:DeleteNetworkInterface', - 'ec2:DescribeSubnets', - 'ec2:DescribeSecurityGroups', - 'logs:CreateLogGroup', - 'logs:CreateLogStream', - 'logs:PutLogEvents'] - Effect: Allow - Resource: '*' - ManagedPolicyArns: ['arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'] + - PolicyName: IntegrationTestExecution + PolicyDocument: + Statement: + - Action: [kafka:DescribeCluster, kafka:GetBootstrapBrokers, ec2:CreateNetworkInterface, + ec2:DescribeNetworkInterfaces, ec2:DescribeVpcs, ec2:DeleteNetworkInterface, + ec2:DescribeSubnets, ec2:DescribeSecurityGroups, logs:CreateLogGroup, + logs:CreateLogStream, logs:PutLogEvents] + Effect: Allow + Resource: '*' + ManagedPolicyArns: [arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole] Tags: - - {Value: SAM, Key: 'lambda:createdBy'} + - {Value: SAM, Key: lambda:createdBy} MyMskCluster: - Type: 'AWS::MSK::Cluster' + Type: AWS::MSK::Cluster Properties: BrokerNodeGroupInfo: ClientSubnets: - - Ref: PreCreatedSubnetOne - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetTwo InstanceType: kafka.t3.small StorageInfo: EBSStorageInfo: @@ -70,5 +63,4 @@ Resources: Stream: Ref: MyMskCluster Topics: - - "MyDummyTestTopic" - + - MyDummyTestTopic diff --git a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml index 0be330b87e..9f2dba67ef 100644 --- a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml +++ b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml @@ -8,12 +8,12 @@ Parameters: Resources: MyMskCluster: - Type: 'AWS::MSK::Cluster' + Type: AWS::MSK::Cluster Properties: BrokerNodeGroupInfo: ClientSubnets: - - Ref: PreCreatedSubnetOne - - Ref: PreCreatedSubnetTwo + - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetTwo InstanceType: kafka.t3.small StorageInfo: EBSStorageInfo: @@ -37,5 +37,4 @@ Resources: Stream: Ref: MyMskCluster Topics: - - "MyDummyTestTopic" - + - MyDummyTestTopic diff --git a/integration/resources/templates/combination/function_with_policy_templates.yaml b/integration/resources/templates/combination/function_with_policy_templates.yaml index 31bcc1a303..c24209d47b 100644 --- a/integration/resources/templates/combination/function_with_policy_templates.yaml +++ b/integration/resources/templates/combination/function_with_policy_templates.yaml @@ -1,41 +1,41 @@ Parameters: FunctionNameParam: Type: String - Default: "somename" + Default: somename Conditions: TrueCondition: - Fn::Equals: ["true", "true"] + Fn::Equals: ['true', 'true'] Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler Runtime: python3.8 Policies: - - SQSPollerPolicy: - QueueName: - Fn::GetAtt: ["MyQueue", "QueueName"] - - LambdaInvokePolicy: - FunctionName: - Ref: FunctionNameParam + - SQSPollerPolicy: + QueueName: + Fn::GetAtt: [MyQueue, QueueName] + - LambdaInvokePolicy: + FunctionName: + Ref: FunctionNameParam - - Fn::If: - - TrueCondition + - Fn::If: + - TrueCondition - - CloudWatchPutMetricPolicy: {} + - CloudWatchPutMetricPolicy: {} - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} - - Fn::If: - - TrueCondition + - Fn::If: + - TrueCondition - - Ref: "AWS::NoValue" + - Ref: AWS::NoValue - - EC2DescribePolicy: {} + - EC2DescribePolicy: {} MyQueue: Type: AWS::SQS::Queue diff --git a/integration/resources/templates/combination/function_with_resource_refs.yaml b/integration/resources/templates/combination/function_with_resource_refs.yaml index d8b92b71b4..aed5d11f03 100644 --- a/integration/resources/templates/combination/function_with_resource_refs.yaml +++ b/integration/resources/templates/combination/function_with_resource_refs.yaml @@ -6,7 +6,7 @@ Resources: MyLambdaFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler @@ -14,7 +14,7 @@ Resources: AutoPublishAlias: Live MyOtherFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Runtime: python3.8 @@ -33,7 +33,7 @@ Outputs: AliasInSub: Value: - Fn::Sub: ["${MyLambdaFunction.Alias} ${SomeValue}", {"SomeValue": "Alias"}] + Fn::Sub: ['${MyLambdaFunction.Alias} ${SomeValue}', SomeValue: Alias] VersionArn: Value: @@ -41,4 +41,4 @@ Outputs: VersionNumber: Value: - Fn::GetAtt: ["MyLambdaFunction.Version", "Version"] + Fn::GetAtt: [MyLambdaFunction.Version, Version] diff --git a/integration/resources/templates/combination/function_with_s3_intrinsics.yaml b/integration/resources/templates/combination/function_with_s3_intrinsics.yaml index a1009a8c53..ec3a9e07d5 100644 --- a/integration/resources/templates/combination/function_with_s3_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_s3_intrinsics.yaml @@ -1,8 +1,8 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -22,15 +22,15 @@ Resources: Events: s3:ObjectCreated:* Filter: Fn::If: - - MyCondition - - S3Key: - Rules: - - Name: prefix - Value: object_prefix - - S3Key: - Rules: - - Name: suffix - Value: object_suffix + - MyCondition + - S3Key: + Rules: + - Name: prefix + Value: object_prefix + - S3Key: + Rules: + - Name: suffix + Value: object_suffix MyBucket: Type: AWS::S3::Bucket diff --git a/integration/resources/templates/combination/function_with_schedule.yaml b/integration/resources/templates/combination/function_with_schedule.yaml index 9e05a4f748..f8f7ca91d5 100644 --- a/integration/resources/templates/combination/function_with_schedule.yaml +++ b/integration/resources/templates/combination/function_with_schedule.yaml @@ -14,9 +14,9 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Name: - Ref: ScheduleName - Description: test schedule - Enabled: True + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Name: + Ref: ScheduleName + Description: test schedule + Enabled: true diff --git a/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml index 4a57be458d..77b3464cb5 100644 --- a/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/function_with_schedule_dlq_and_retry_policy.yaml @@ -13,26 +13,26 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Description: test schedule - Enabled: True - DeadLetterConfig: - Arn: - Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" - RetryPolicy: - MaximumRetryAttempts: 10 + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Description: test schedule + Enabled: true + DeadLetterConfig: + Arn: + Fn::GetAtt: + - MyDeadLetterQueue + - Arn + RetryPolicy: + MaximumRetryAttempts: 10 Outputs: ScheduleName: - Description: "Name of the cw schedule" + Description: Name of the cw schedule Value: Ref: MyLambdaFunctionRepeat MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn diff --git a/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml b/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml index 40b700dae2..bf80091e74 100644 --- a/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml +++ b/integration/resources/templates/combination/function_with_schedule_dlq_generated.yaml @@ -10,31 +10,31 @@ Resources: Repeat: Type: Schedule Properties: - Schedule: 'rate(5 minutes)' - Input: '{"Hello": "world!"}' - Description: test schedule - Enabled: True - DeadLetterConfig: - Type: SQS + Schedule: rate(5 minutes) + Input: '{"Hello": "world!"}' + Description: test schedule + Enabled: true + DeadLetterConfig: + Type: SQS Outputs: ScheduleName: - Description: "Name of the cw schedule" + Description: Name of the cw schedule Value: Ref: MyLambdaFunctionRepeat MyLambdaArn: - Description: "Arn of the lambda target" + Description: Arn of the lambda target Value: Fn::GetAtt: - - "MyLambdaFunction" - - "Arn" + - MyLambdaFunction + - Arn MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyLambdaFunctionRepeatQueue" - - "Arn" + - MyLambdaFunctionRepeatQueue + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the Schedule rule target" + Description: Url of the dead-letter queue created for the Schedule rule target Value: - Ref: MyLambdaFunctionRepeatQueue \ No newline at end of file + Ref: MyLambdaFunctionRepeatQueue diff --git a/integration/resources/templates/combination/function_with_self_managed_kafka.yaml b/integration/resources/templates/combination/function_with_self_managed_kafka.yaml index ad91968ea8..f432b51559 100644 --- a/integration/resources/templates/combination/function_with_self_managed_kafka.yaml +++ b/integration/resources/templates/combination/function_with_self_managed_kafka.yaml @@ -11,14 +11,14 @@ Resources: Type: SelfManagedKafka Properties: KafkaBootstrapServers: - - abc.xyz.com:9092 - - 123.45.67.89:9096 + - abc.xyz.com:9092 + - 123.45.67.89:9096 Topics: - - Topic1 + - Topic1 SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: KafkaUserSecret + - Type: BASIC_AUTH + URI: + Ref: KafkaUserSecret KafkaUserSecret: Type: AWS::SecretsManager::Secret @@ -26,4 +26,3 @@ Resources: Name: KafkaUserPassword SecretString: Fn::Sub: '{"username":"testBrokerUser","password":"testBrokerPassword"}' - diff --git a/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml b/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml index 01e1d59cab..51ec5d9d1f 100644 --- a/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_self_managed_kafka_intrinsics.yaml @@ -20,13 +20,13 @@ Resources: Type: SelfManagedKafka Properties: KafkaBootstrapServers: - - Ref: KafkaBootstrapServersValue + - Ref: KafkaBootstrapServersValue Topics: Ref: TopicsValue SourceAccessConfigurations: - - Type: BASIC_AUTH - URI: - Ref: KafkaUserSecret + - Type: BASIC_AUTH + URI: + Ref: KafkaUserSecret KafkaUserSecret: Type: AWS::SecretsManager::Secret @@ -34,4 +34,3 @@ Resources: Name: KafkaUserPassword SecretString: Fn::Sub: '{"username":"testBrokerUserWithInstrinsic","password":"testBrokerPasswordWithInstrinsic"}' - diff --git a/integration/resources/templates/combination/function_with_signing_profile.yaml b/integration/resources/templates/combination/function_with_signing_profile.yaml index f1534cff5f..dde27135d0 100644 --- a/integration/resources/templates/combination/function_with_signing_profile.yaml +++ b/integration/resources/templates/combination/function_with_signing_profile.yaml @@ -1,29 +1,27 @@ Resources: - # a function which has lambda signing configuration # due to the nature of the flow, we can't sign this package # and we are setting warning for signing config - MyUnsignedLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - CodeSigningConfigArn: - Ref: MySignedFunctionCodeSigningConfig - - MySignedFunctionCodeSigningConfig: - Type: AWS::Lambda::CodeSigningConfig - Properties: - Description: "Code Signing for MyUnsignedLambdaFunction" - AllowedPublishers: - SigningProfileVersionArns: - - Fn::GetAtt: MySigningProfile.ProfileVersionArn - CodeSigningPolicies: - UntrustedArtifactOnDeployment: "Warn" - - MySigningProfile: - Type: AWS::Signer::SigningProfile - Properties: - PlatformId: AWSLambda-SHA384-ECDSA + MyUnsignedLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + CodeSigningConfigArn: + Ref: MySignedFunctionCodeSigningConfig + + MySignedFunctionCodeSigningConfig: + Type: AWS::Lambda::CodeSigningConfig + Properties: + Description: Code Signing for MyUnsignedLambdaFunction + AllowedPublishers: + SigningProfileVersionArns: + - Fn::GetAtt: MySigningProfile.ProfileVersionArn + CodeSigningPolicies: + UntrustedArtifactOnDeployment: Warn + MySigningProfile: + Type: AWS::Signer::SigningProfile + Properties: + PlatformId: AWSLambda-SHA384-ECDSA diff --git a/integration/resources/templates/combination/function_with_sns.yaml b/integration/resources/templates/combination/function_with_sns.yaml index 68b7756fdf..34cd27fa7a 100644 --- a/integration/resources/templates/combination/function_with_sns.yaml +++ b/integration/resources/templates/combination/function_with_sns.yaml @@ -13,7 +13,7 @@ Resources: Properties: Topic: Ref: MySnsTopic - + SQSSubscriptionEvent: Type: SNS Properties: @@ -25,4 +25,3 @@ Resources: # This is a CloudFormation SNS resource MySnsTopic: Type: AWS::SNS::Topic - diff --git a/integration/resources/templates/combination/function_with_sns_intrinsics.yaml b/integration/resources/templates/combination/function_with_sns_intrinsics.yaml index 664a5385e2..a98736d8fb 100644 --- a/integration/resources/templates/combination/function_with_sns_intrinsics.yaml +++ b/integration/resources/templates/combination/function_with_sns_intrinsics.yaml @@ -1,8 +1,8 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -21,15 +21,15 @@ Resources: Ref: MySnsTopic FilterPolicy: Fn::If: - - MyCondition - - price_usd: - - numeric: - - ">=" - - 100 - - price_usd: - - numeric: - - "<" - - 100 + - MyCondition + - price_usd: + - numeric: + - '>=' + - 100 + - price_usd: + - numeric: + - < + - 100 Region: Ref: AWS::Region SqsSubscription: true diff --git a/integration/resources/templates/combination/function_with_sqs.yaml b/integration/resources/templates/combination/function_with_sqs.yaml index 7f0f5d225b..53b0901759 100644 --- a/integration/resources/templates/combination/function_with_sqs.yaml +++ b/integration/resources/templates/combination/function_with_sqs.yaml @@ -10,8 +10,8 @@ Resources: Type: SQS Properties: Queue: - Fn::GetAtt: ["MySqsQueue", "Arn"] + Fn::GetAtt: [MySqsQueue, Arn] BatchSize: 2 MySqsQueue: - Type: AWS::SQS::Queue \ No newline at end of file + Type: AWS::SQS::Queue diff --git a/integration/resources/templates/combination/function_with_userpool_event.yaml b/integration/resources/templates/combination/function_with_userpool_event.yaml index 7e8617e6b3..babfe774f3 100644 --- a/integration/resources/templates/combination/function_with_userpool_event.yaml +++ b/integration/resources/templates/combination/function_with_userpool_event.yaml @@ -13,11 +13,11 @@ Resources: PasswordPolicy: MinimumLength: 8 UsernameAttributes: - - email + - email Schema: - - AttributeDataType: String - Name: email - Required: false + - AttributeDataType: String + Name: email + Required: false PreSignupLambdaFunction: Type: AWS::Serverless::Function @@ -40,16 +40,16 @@ Resources: Trigger: PreSignUp Outputs: - Region: - Description: "Region" - Value: - Ref: AWS::Region - - PreSignupLambdaFunctionArn: - Description: "lambda Function Arn" - Value: - Fn::GetAtt: [PreSignupLambdaFunction, Arn] - CognitoUserPoolId: - Description: "Cognito User Pool Id" - Value: - Ref: MyCognitoUserPool \ No newline at end of file + Region: + Description: Region + Value: + Ref: AWS::Region + + PreSignupLambdaFunctionArn: + Description: lambda Function Arn + Value: + Fn::GetAtt: [PreSignupLambdaFunction, Arn] + CognitoUserPoolId: + Description: Cognito User Pool Id + Value: + Ref: MyCognitoUserPool diff --git a/integration/resources/templates/combination/http_api_with_auth.yaml b/integration/resources/templates/combination/http_api_with_auth.yaml index 623aa13cfa..6e6e22cee8 100644 --- a/integration/resources/templates/combination/http_api_with_auth.yaml +++ b/integration/resources/templates/combination/http_api_with_auth.yaml @@ -14,7 +14,7 @@ Resources: Properties: Auth: Authorizer: MyOAuth2Auth - ApiId: + ApiId: Ref: MyApi Method: GET Path: /get @@ -23,14 +23,14 @@ Resources: Properties: Auth: Authorizer: MyLambdaAuth - ApiId: + ApiId: Ref: MyApi Method: POST Path: /post DefaultApi: Type: HttpApi Properties: - ApiId: + ApiId: Ref: MyApi Method: DEFAULT Path: /default/post @@ -50,32 +50,32 @@ Resources: Auth: Authorizers: MyLambdaAuth: - FunctionArn: + FunctionArn: Fn::GetAtt: - - MyAuthFn - - Arn + - MyAuthFn + - Arn FunctionInvokeRole: Fn::GetAtt: - - MyAuthFnRole - - Arn + - MyAuthFnRole + - Arn Identity: Context: - - contextVar + - contextVar Headers: - - Authorization + - Authorization QueryStrings: - - petId + - petId StageVariables: - - stageVar + - stageVar ReauthorizeEvery: 23 EnableSimpleResponses: true AuthorizerPayloadFormatVersion: 2.0 MyOAuth2Auth: AuthorizationScopes: - - scope4 + - scope4 JwtConfiguration: - issuer: "https://openid-connect.onelogin.com/oidc" + issuer: https://openid-connect.onelogin.com/oidc audience: - - MyApi - IdentitySource: "$request.querystring.param" - DefaultAuthorizer: MyOAuth2Auth \ No newline at end of file + - MyApi + IdentitySource: $request.querystring.param + DefaultAuthorizer: MyOAuth2Auth diff --git a/integration/resources/templates/combination/http_api_with_auth_updated.yaml b/integration/resources/templates/combination/http_api_with_auth_updated.yaml index 68e5b61d15..064c336421 100644 --- a/integration/resources/templates/combination/http_api_with_auth_updated.yaml +++ b/integration/resources/templates/combination/http_api_with_auth_updated.yaml @@ -14,7 +14,7 @@ Resources: Properties: Auth: Authorizer: MyLambdaAuthUpdated - ApiId: + ApiId: Ref: MyApi Method: POST Path: /post @@ -36,18 +36,18 @@ Resources: Auth: Authorizers: MyLambdaAuthUpdated: - FunctionArn: + FunctionArn: Fn::GetAtt: - - MyAuthFn - - Arn + - MyAuthFn + - Arn FunctionInvokeRole: Fn::GetAtt: - - MyAuthFnRole - - Arn + - MyAuthFnRole + - Arn Identity: Headers: - - Authorization + - Authorization ReauthorizeEvery: 37 EnableSimpleResponses: false AuthorizerPayloadFormatVersion: 1.0 - DefaultAuthorizer: MyLambdaAuthUpdated \ No newline at end of file + DefaultAuthorizer: MyLambdaAuthUpdated diff --git a/integration/resources/templates/combination/http_api_with_cors.yaml b/integration/resources/templates/combination/http_api_with_cors.yaml index cb9a3170f6..e5da7052b0 100644 --- a/integration/resources/templates/combination/http_api_with_cors.yaml +++ b/integration/resources/templates/combination/http_api_with_cors.yaml @@ -1,28 +1,27 @@ - Globals: HttpApi: CorsConfiguration: AllowHeaders: - - x-apigateway-header + - x-apigateway-header AllowMethods: - - GET + - GET AllowOrigins: - - https://foo.com + - https://foo.com ExposeHeaders: - - x-amzn-header + - x-amzn-header Resources: HttpApiFunction: Type: AWS::Serverless::Function Properties: InlineCode: | - exports.handler = async (event) => { - return { - statusCode: 200, - body: JSON.stringify(event), - headers: {} - } - } + exports.handler = async (event) => { + return { + statusCode: 200, + body: JSON.stringify(event), + headers: {} + } + } Handler: index.handler Runtime: nodejs14.x Events: @@ -32,14 +31,14 @@ Resources: Method: GET Path: /path TimeoutInMillis: 15000 - PayloadFormatVersion: "1.0" + PayloadFormatVersion: '1.0' Outputs: ApiUrl: Description: URL of your API endpoint Value: - Fn::Sub: 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/' + Fn::Sub: https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/ ApiId: Description: Api id of ServerlessHttpApi Value: - Ref: ServerlessHttpApi + Ref: ServerlessHttpApi diff --git a/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml b/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml index 5fceb14b07..2edb4c447b 100644 --- a/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml +++ b/integration/resources/templates/combination/http_api_with_custom_domains_regional.yaml @@ -19,8 +19,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId @@ -45,14 +45,14 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi diff --git a/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml b/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml index b8ffb2ba86..c1598be02c 100644 --- a/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml +++ b/integration/resources/templates/combination/http_api_with_custom_domains_regional_ownership_verification.yaml @@ -21,8 +21,8 @@ Globals: TruststoreVersion: 0 SecurityPolicy: TLS_1_2 BasePath: - - /get - - /post + - /get + - /post Route53: HostedZoneId: Ref: HostedZoneId diff --git a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml index 675fcc2329..c7c36969fc 100644 --- a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml +++ b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_false.yaml @@ -18,21 +18,21 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi Properties: - DisableExecuteApiEndpoint: False + DisableExecuteApiEndpoint: false StageName: Prod Outputs: ApiId: Value: - Ref: MyApi \ No newline at end of file + Ref: MyApi diff --git a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml index 0f72aaf006..d182b207f3 100644 --- a/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml +++ b/integration/resources/templates/combination/http_api_with_disable_execute_api_endpoint_true.yaml @@ -18,14 +18,14 @@ Resources: Properties: Method: Get Path: /get - ApiId: + ApiId: Ref: MyApi ImplicitPost: Type: HttpApi Properties: Method: Post Path: /post - ApiId: + ApiId: Ref: MyApi MyApi: Type: AWS::Serverless::HttpApi @@ -36,4 +36,4 @@ Resources: Outputs: ApiId: Value: - Ref: MyApi \ No newline at end of file + Ref: MyApi diff --git a/integration/resources/templates/combination/implicit_api_with_settings.yaml b/integration/resources/templates/combination/implicit_api_with_settings.yaml index 5cabedb29b..60158e54be 100644 --- a/integration/resources/templates/combination/implicit_api_with_settings.yaml +++ b/integration/resources/templates/combination/implicit_api_with_settings.yaml @@ -2,15 +2,10 @@ Globals: Api: EndpointConfiguration: REGIONAL BinaryMediaTypes: - - image~1jpg - - image~1png - MethodSettings: [{ - "LoggingLevel": "INFO", - "MetricsEnabled": True, - "DataTraceEnabled": True, - "ResourcePath": "/*", - "HttpMethod": "*" - }] + - image~1jpg + - image~1png + MethodSettings: [{LoggingLevel: INFO, MetricsEnabled: true, DataTraceEnabled: true, + ResourcePath: /*, HttpMethod: '*'}] Resources: MyLambdaFunction: diff --git a/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml b/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml index c540057a49..c68fc7e5e9 100644 --- a/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml +++ b/integration/resources/templates/combination/intrinsics_code_definition_uri.yaml @@ -1,12 +1,12 @@ # Must support explicit bucket, key and version in CodeUri and DefinitionUri parameters Parameters: - Bucket: - Type: String - CodeKey: - Type: String - SwaggerKey: - Type: String + Bucket: + Type: String + CodeKey: + Type: String + SwaggerKey: + Type: String Resources: @@ -32,4 +32,3 @@ Resources: Ref: Bucket Key: Ref: SwaggerKey - diff --git a/integration/resources/templates/combination/intrinsics_serverless_api.yaml b/integration/resources/templates/combination/intrinsics_serverless_api.yaml index 0cd4506887..5feaa7654b 100644 --- a/integration/resources/templates/combination/intrinsics_serverless_api.yaml +++ b/integration/resources/templates/combination/intrinsics_serverless_api.yaml @@ -10,17 +10,17 @@ Parameters: Default: devstage CacheClusterEnabled: Type: String - Default: "true" + Default: 'true' Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: @@ -95,9 +95,9 @@ Resources: Ref: SwaggerKey Variables: Var1: - "Fn::Join": ["", ["a", "b"]] + Fn::Join: ['', [a, b]] Var2: - "Fn::Join": ["", ["1", "2"]] + Fn::Join: ['', ['1', '2']] MyApiFalseCondition: Type: AWS::Serverless::Api @@ -112,7 +112,6 @@ Resources: Ref: SwaggerKey Variables: Var1: - "Fn::Join": ["", ["a", "b"]] + Fn::Join: ['', [a, b]] Var2: - "Fn::Join": ["", ["1", "2"]] - + Fn::Join: ['', ['1', '2']] diff --git a/integration/resources/templates/combination/intrinsics_serverless_function.yaml b/integration/resources/templates/combination/intrinsics_serverless_function.yaml index 703242bcc9..e9429e2d08 100644 --- a/integration/resources/templates/combination/intrinsics_serverless_function.yaml +++ b/integration/resources/templates/combination/intrinsics_serverless_function.yaml @@ -22,65 +22,65 @@ Parameters: Conditions: TrueCondition: Fn::Equals: - - true - - true + - true + - true FalseCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: TrueCondition Properties: CodeUri: Bucket: Ref: Bucket Key: - "Fn::Sub": ["${CodeKey}${extn}", {extn: ""}] + Fn::Sub: ['${CodeKey}${extn}', extn: ''] Handler: - "Fn::Sub": ["${filename}.handler", {filename: "index"}] + Fn::Sub: ['${filename}.handler', filename: index] Runtime: - "Fn::Join": ["", ["nodejs", "12.x"]] + Fn::Join: ['', [nodejs, 12.x]] Role: - "Fn::GetAtt": ["MyNewRole", "Arn"] + Fn::GetAtt: [MyNewRole, Arn] - Description: "Some description" + Description: Some description MemorySize: Ref: MemorySize Timeout: Ref: Timeout - + AutoPublishCodeSha256: Ref: AutoPublishSha Environment: Variables: MyRoleArn: - "Fn::GetAtt": ["MyNewRole", "Arn"] + Fn::GetAtt: [MyNewRole, Arn] InputParameter: Ref: CodeKey VpcConfig: SecurityGroupIds: - - "Fn::GetAtt": ["MySecurityGroup", "GroupId"] + - Fn::GetAtt: [MySecurityGroup, GroupId] SubnetIds: - - Ref: PreCreatedSubnetOne + - Ref: PreCreatedSubnetOne # Additional resources to reference inside the Function resource MyNewRole: Type: AWS::IAM::Role Properties: ManagedPolicyArns: - - {"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"} - - {"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"} + - {Fn::Sub: 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'} + - {Fn::Sub: 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole'} AssumeRolePolicyDocument: Version: '2012-10-17' Statement: @@ -92,27 +92,25 @@ Resources: - lambda.amazonaws.com MySecurityGroup: - Type: "AWS::EC2::SecurityGroup" + Type: AWS::EC2::SecurityGroup Properties: - GroupDescription: "my test group" + GroupDescription: my test group VpcId: Ref: PreCreatedVpc # False condition, shouldn't be created MyFunctionFalseCondition: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Condition: FalseCondition Properties: CodeUri: Bucket: Ref: Bucket Key: - "Fn::Sub": ["${CodeKey}${extn}", {extn: ""}] + Fn::Sub: ['${CodeKey}${extn}', extn: ''] Handler: - "Fn::Sub": ["${filename}.handler", {filename: "index"}] + Fn::Sub: ['${filename}.handler', filename: index] Runtime: - "Fn::Join": ["", ["nodejs", "12.x"]] - - + Fn::Join: ['', [nodejs, 12.x]] diff --git a/integration/resources/templates/combination/state_machine_with_api.yaml b/integration/resources/templates/combination/state_machine_with_api.yaml index 23946e3d24..073675a382 100644 --- a/integration/resources/templates/combination/state_machine_with_api.yaml +++ b/integration/resources/templates/combination/state_machine_with_api.yaml @@ -4,7 +4,7 @@ Resources: ExistingRestApi: Type: AWS::Serverless::Api Properties: - StageName: "Dev" + StageName: Dev MyStateMachine: Type: AWS::Serverless::StateMachine @@ -22,11 +22,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: GetApi: @@ -45,30 +45,30 @@ Resources: Outputs: Region: - Description: "Region" + Description: Region Value: Ref: AWS::Region Partition: - Description: "Partition" + Description: Partition Value: Ref: AWS::Partition MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyImplicitApiRoleName: - Description: "Name of the role created for the implicit Api method" + Description: Name of the role created for the implicit Api method Value: Ref: MyStateMachinePostApiRole MyImplicitApiRoleArn: - Description: "ARN of the role created for the implicit Api method" + Description: ARN of the role created for the implicit Api method Value: Fn::GetAtt: MyStateMachinePostApiRole.Arn MyExplicitApiRoleName: - Description: "Name of the role created for the explicit Api method" + Description: Name of the role created for the explicit Api method Value: Ref: MyStateMachineGetApiRole MyExplicitApiRoleArn: - Description: "ARN of the role created for the explicit Api method" + Description: ARN of the role created for the explicit Api method Value: Fn::GetAtt: MyStateMachineGetApiRole.Arn diff --git a/integration/resources/templates/combination/state_machine_with_cwe.yaml b/integration/resources/templates/combination/state_machine_with_cwe.yaml index c2b8a5dcb6..9ad6850c7d 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe.yaml @@ -16,11 +16,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: CloudWatchEvent @@ -28,18 +28,18 @@ Resources: Pattern: detail: state: - - terminated + - terminated Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: - Ref: MyStateMachineCWEventRole \ No newline at end of file + Ref: MyStateMachineCWEventRole diff --git a/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml b/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml index 5a21852269..4947179422 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe_dlq_generated.yaml @@ -16,11 +16,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: EventBridgeRule @@ -28,7 +28,7 @@ Resources: Pattern: detail: state: - - terminated + - terminated DeadLetterConfig: Type: SQS RetryPolicy: @@ -36,24 +36,24 @@ Resources: Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: Ref: MyStateMachineCWEventRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the CWE rule target" + Description: Arn of the dead-letter queue created for the CWE rule target Value: Fn::GetAtt: - - "MyStateMachineCWEventQueue" - - "Arn" + - MyStateMachineCWEventQueue + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the CWE rule target" + Description: Url of the dead-letter queue created for the CWE rule target Value: - Ref: MyStateMachineCWEventQueue \ No newline at end of file + Ref: MyStateMachineCWEventQueue diff --git a/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml index 4637164373..83b59c82c8 100644 --- a/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/state_machine_with_cwe_with_dlq_and_retry_policy.yaml @@ -18,11 +18,11 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWEvent: Type: EventBridgeRule @@ -30,32 +30,32 @@ Resources: Pattern: detail: state: - - terminated + - terminated DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn RetryPolicy: MaximumEventAgeInSeconds: 400 MaximumRetryAttempts: 5 Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyEventName: - Description: "Name of the CloudWatchEvent rule created" + Description: Name of the CloudWatchEvent rule created Value: Ref: MyStateMachineCWEvent MyEventRole: - Description: "Name of the role created for the CWE rule" + Description: Name of the role created for the CWE rule Value: Ref: MyStateMachineCWEventRole MyDLQArn: - Description: "Arn of the dead-letter queue provided for the CWE rule target" + Description: Arn of the dead-letter queue provided for the CWE rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn diff --git a/integration/resources/templates/combination/state_machine_with_policy_templates.yaml b/integration/resources/templates/combination/state_machine_with_policy_templates.yaml index cafa9f0070..b8d12b1b8c 100644 --- a/integration/resources/templates/combination/state_machine_with_policy_templates.yaml +++ b/integration/resources/templates/combination/state_machine_with_policy_templates.yaml @@ -10,14 +10,14 @@ Resources: Type: Task Resource: Fn::GetAtt: MyFunction.Arn - End: True + End: true Policies: - - SQSPollerPolicy: - QueueName: - Fn::GetAtt: ["MyQueue", "QueueName"] - - LambdaInvokePolicy: - FunctionName: - Ref: MyFunction + - SQSPollerPolicy: + QueueName: + Fn::GetAtt: [MyQueue, QueueName] + - LambdaInvokePolicy: + FunctionName: + Ref: MyFunction MyFunction: Type: AWS::Serverless::Function @@ -31,6 +31,6 @@ Resources: Outputs: MyStateMachineRole: - Description: "ARN of the role created for the State Machine" + Description: ARN of the role created for the State Machine Value: - Ref: MyStateMachineRole \ No newline at end of file + Ref: MyStateMachineRole diff --git a/integration/resources/templates/combination/state_machine_with_schedule.yaml b/integration/resources/templates/combination/state_machine_with_schedule.yaml index 7f88689024..3818ef13fc 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule.yaml @@ -16,30 +16,30 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: - Ref: MyStateMachineCWScheduleRole \ No newline at end of file + Ref: MyStateMachineCWScheduleRole diff --git a/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml b/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml index 5abae8a4a8..8b1fc5965d 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule_dlq_and_retry_policy.yaml @@ -18,44 +18,44 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false DeadLetterConfig: Arn: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" + - MyDeadLetterQueue + - Arn RetryPolicy: MaximumRetryAttempts: 2 Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: Ref: MyStateMachineCWScheduleRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDeadLetterQueue" - - "Arn" \ No newline at end of file + - MyDeadLetterQueue + - Arn diff --git a/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml b/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml index ec84d43877..382fb4efe7 100644 --- a/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml +++ b/integration/resources/templates/combination/state_machine_with_schedule_dlq_generated.yaml @@ -16,43 +16,43 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Events: CWSchedule: Type: Schedule Properties: - Schedule: 'rate(1 minute)' + Schedule: rate(1 minute) Description: test schedule - Enabled: False + Enabled: false DeadLetterConfig: Type: SQS QueueLogicalId: MyDlq Outputs: MyStateMachineArn: - Description: "ARN of the State Machine" + Description: ARN of the State Machine Value: Ref: MyStateMachine MyScheduleName: - Description: "Name of the Schedule rule created" + Description: Name of the Schedule rule created Value: Ref: MyStateMachineCWSchedule MyEventRole: - Description: "ARN of the role created for the Schedule rule" + Description: ARN of the role created for the Schedule rule Value: Ref: MyStateMachineCWScheduleRole MyDLQArn: - Description: "Arn of the dead-letter queue created for the Schedule rule target" + Description: Arn of the dead-letter queue created for the Schedule rule target Value: Fn::GetAtt: - - "MyDlq" - - "Arn" + - MyDlq + - Arn MyDLQUrl: - Description: "Url of the dead-letter queue created for the Schedule rule target" + Description: Url of the dead-letter queue created for the Schedule rule target Value: - Ref: MyDlq \ No newline at end of file + Ref: MyDlq diff --git a/integration/resources/templates/single/basic_api_inline_openapi.yaml b/integration/resources/templates/single/basic_api_inline_openapi.yaml index 7f14ad5dc3..c0dac2fec0 100644 --- a/integration/resources/templates/single/basic_api_inline_openapi.yaml +++ b/integration/resources/templates/single/basic_api_inline_openapi.yaml @@ -5,23 +5,23 @@ Resources: StageName: MyNewStageName DefinitionBody: # Simple HTTP Proxy API - openapi: "3.0" + openapi: '3.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy diff --git a/integration/resources/templates/single/basic_api_inline_swagger.yaml b/integration/resources/templates/single/basic_api_inline_swagger.yaml index ce9ff24298..1661d95724 100644 --- a/integration/resources/templates/single/basic_api_inline_swagger.yaml +++ b/integration/resources/templates/single/basic_api_inline_swagger.yaml @@ -5,23 +5,23 @@ Resources: StageName: MyNewStageName DefinitionBody: # Simple HTTP Proxy API - swagger: "2.0" + swagger: '2.0' info: - version: "2016-09-23T22:23:23Z" - title: "Simple Api" - basePath: "/demo" + version: '2016-09-23T22:23:23Z' + title: Simple Api + basePath: /demo schemes: - - "https" + - https paths: /http/{proxy+}: x-amazon-apigateway-any-method: parameters: - - name: "proxy" - in: "path" + - name: proxy + in: path x-amazon-apigateway-integration: - type: "http_proxy" - uri: "http://httpbin.org/{proxy}" - httpMethod: "ANY" - passthroughBehavior: "when_no_match" + type: http_proxy + uri: http://httpbin.org/{proxy} + httpMethod: ANY + passthroughBehavior: when_no_match requestParameters: - integration.request.path.proxy: "method.request.path.proxy" + integration.request.path.proxy: method.request.path.proxy diff --git a/integration/resources/templates/single/basic_api_with_mode.yaml b/integration/resources/templates/single/basic_api_with_mode.yaml index ffad6b15d8..9b73689335 100644 --- a/integration/resources/templates/single/basic_api_with_mode.yaml +++ b/integration/resources/templates/single/basic_api_with_mode.yaml @@ -6,7 +6,7 @@ Resources: Mode: overwrite TestFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: python3.8 diff --git a/integration/resources/templates/single/basic_api_with_mode_update.yaml b/integration/resources/templates/single/basic_api_with_mode_update.yaml index 3f34693b94..ea2fb5f298 100644 --- a/integration/resources/templates/single/basic_api_with_mode_update.yaml +++ b/integration/resources/templates/single/basic_api_with_mode_update.yaml @@ -6,7 +6,7 @@ Resources: Mode: overwrite TestFunction: - Type: 'AWS::Serverless::Function' + Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: python3.8 @@ -21,4 +21,3 @@ Resources: Path: /put Method: put RestApiId: !Ref MyApi - diff --git a/integration/resources/templates/single/basic_api_with_tags.yaml b/integration/resources/templates/single/basic_api_with_tags.yaml index c3bce8d8d4..c8f1763ae6 100644 --- a/integration/resources/templates/single/basic_api_with_tags.yaml +++ b/integration/resources/templates/single/basic_api_with_tags.yaml @@ -5,5 +5,5 @@ Resources: StageName: my-new-stage-name DefinitionUri: ${definitionuri} Tags: - TagKey1: TagValue1 - TagKey2: "" + TagKey1: TagValue1 + TagKey2: '' diff --git a/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml b/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml index 2c1dd3ba3b..a71b42f13d 100644 --- a/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml +++ b/integration/resources/templates/single/basic_application_sar_location_with_intrinsics.yaml @@ -45,12 +45,12 @@ Resources: SemanticVersion: Fn::FindInMap: - SARApplication - - { Ref: 'AWS::Region' } + - {Ref: AWS::Region} - SemanticVersion Parameters: IdentityNameParameter: test NotificationARNs: - - Ref: MySns + - Ref: MySns MySns: - Type: AWS::SNS::Topic \ No newline at end of file + Type: AWS::SNS::Topic diff --git a/integration/resources/templates/single/basic_function.yaml b/integration/resources/templates/single/basic_function.yaml index ae6b002c40..8119e89acc 100644 --- a/integration/resources/templates/single/basic_function.yaml +++ b/integration/resources/templates/single/basic_function.yaml @@ -1,15 +1,15 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 diff --git a/integration/resources/templates/single/basic_function_event_destinations.yaml b/integration/resources/templates/single/basic_function_event_destinations.yaml index d3f8d9934c..6b009525ed 100644 --- a/integration/resources/templates/single/basic_function_event_destinations.yaml +++ b/integration/resources/templates/single/basic_function_event_destinations.yaml @@ -1,95 +1,95 @@ Conditions: - QueueCreationDisabled: - Fn::Equals: - - false - - true + QueueCreationDisabled: + Fn::Equals: + - false + - true Resources: - MyTestFunction: - Type: AWS::Serverless::Function - Properties: - EventInvokeConfig: - MaximumEventAgeInSeconds: 70 - MaximumRetryAttempts: 1 - DestinationConfig: - OnSuccess: - Type: SQS - Destination: - Fn::If: - - QueueCreationDisabled - - Fn::GetAtt: - - DestinationSQS - - Arn - - Ref: 'AWS::NoValue' - OnFailure: - Type: Lambda - Destination: - Fn::GetAtt: - - DestinationLambda - - Arn - InlineCode: | - exports.handler = function(event, context, callback) { - var event_received_at = new Date().toISOString(); - console.log('Event received at: ' + event_received_at); - console.log('Received event:', JSON.stringify(event, null, 2)); - if (event.Success) { - console.log("Success"); - context.callbackWaitsForEmptyEventLoop = false; - callback(null); - } else { - console.log("Failure"); - context.callbackWaitsForEmptyEventLoop = false; - callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); - } - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - MyTestFunction2: - Type: AWS::Serverless::Function - Properties: - AutoPublishAlias: live - EventInvokeConfig: - MaximumEventAgeInSeconds: 80 - MaximumRetryAttempts: 2 - DestinationConfig: - OnSuccess: - Type: SNS - OnFailure: - Type: EventBridge - Destination: - Fn::Sub: arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default - InlineCode: | - exports.handler = function(event, context, callback) { - var event_received_at = new Date().toISOString(); - console.log('Event received at: ' + event_received_at); - console.log('Received event:', JSON.stringify(event, null, 2)); - if (event.Success) { - console.log("Success"); - context.callbackWaitsForEmptyEventLoop = false; - callback(null); - } else { - console.log("Failure"); - context.callbackWaitsForEmptyEventLoop = false; - callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); - } - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - DestinationLambda: - Type: AWS::Serverless::Function - Properties: - InlineCode: | - exports.handler = async (event) => { - const response = { - statusCode: 200, - body: JSON.stringify('Hello from Lambda!'), - }; - return response; - }; - Handler: index.handler - Runtime: nodejs14.x - MemorySize: 1024 - DestinationSQS: - Condition: QueueCreationDisabled - Type: AWS::SQS::Queue + MyTestFunction: + Type: AWS::Serverless::Function + Properties: + EventInvokeConfig: + MaximumEventAgeInSeconds: 70 + MaximumRetryAttempts: 1 + DestinationConfig: + OnSuccess: + Type: SQS + Destination: + Fn::If: + - QueueCreationDisabled + - Fn::GetAtt: + - DestinationSQS + - Arn + - Ref: AWS::NoValue + OnFailure: + Type: Lambda + Destination: + Fn::GetAtt: + - DestinationLambda + - Arn + InlineCode: | + exports.handler = function(event, context, callback) { + var event_received_at = new Date().toISOString(); + console.log('Event received at: ' + event_received_at); + console.log('Received event:', JSON.stringify(event, null, 2)); + if (event.Success) { + console.log("Success"); + context.callbackWaitsForEmptyEventLoop = false; + callback(null); + } else { + console.log("Failure"); + context.callbackWaitsForEmptyEventLoop = false; + callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); + } + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + MyTestFunction2: + Type: AWS::Serverless::Function + Properties: + AutoPublishAlias: live + EventInvokeConfig: + MaximumEventAgeInSeconds: 80 + MaximumRetryAttempts: 2 + DestinationConfig: + OnSuccess: + Type: SNS + OnFailure: + Type: EventBridge + Destination: + Fn::Sub: arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/default + InlineCode: | + exports.handler = function(event, context, callback) { + var event_received_at = new Date().toISOString(); + console.log('Event received at: ' + event_received_at); + console.log('Received event:', JSON.stringify(event, null, 2)); + if (event.Success) { + console.log("Success"); + context.callbackWaitsForEmptyEventLoop = false; + callback(null); + } else { + console.log("Failure"); + context.callbackWaitsForEmptyEventLoop = false; + callback(new Error("Failure from event, Success = false, I am failing!"), 'Destination Function Error Thrown'); + } + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + DestinationLambda: + Type: AWS::Serverless::Function + Properties: + InlineCode: | + exports.handler = async (event) => { + const response = { + statusCode: 200, + body: JSON.stringify('Hello from Lambda!'), + }; + return response; + }; + Handler: index.handler + Runtime: nodejs14.x + MemorySize: 1024 + DestinationSQS: + Condition: QueueCreationDisabled + Type: AWS::SQS::Queue diff --git a/integration/resources/templates/single/basic_function_no_envvar.yaml b/integration/resources/templates/single/basic_function_no_envvar.yaml index 9ae0917bda..bf31cca154 100644 --- a/integration/resources/templates/single/basic_function_no_envvar.yaml +++ b/integration/resources/templates/single/basic_function_no_envvar.yaml @@ -1,11 +1,11 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess diff --git a/integration/resources/templates/single/basic_function_openapi.yaml b/integration/resources/templates/single/basic_function_openapi.yaml index 4e25221de4..a7d742336d 100644 --- a/integration/resources/templates/single/basic_function_openapi.yaml +++ b/integration/resources/templates/single/basic_function_openapi.yaml @@ -1,18 +1,18 @@ Globals: - Api: - OpenApiVersion: 3.0.1 + Api: + OpenApiVersion: 3.0.1 Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 diff --git a/integration/resources/templates/single/basic_function_with_arm_architecture.yaml b/integration/resources/templates/single/basic_function_with_arm_architecture.yaml index 0668e35872..2b48692e72 100644 --- a/integration/resources/templates/single/basic_function_with_arm_architecture.yaml +++ b/integration/resources/templates/single/basic_function_with_arm_architecture.yaml @@ -1,10 +1,9 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Architectures: ["arm64"] - \ No newline at end of file + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Architectures: [arm64] diff --git a/integration/resources/templates/single/basic_function_with_function_url_config.yaml b/integration/resources/templates/single/basic_function_with_function_url_config.yaml index 76bb2692ff..92c8a693f3 100644 --- a/integration/resources/templates/single/basic_function_with_function_url_config.yaml +++ b/integration/resources/templates/single/basic_function_with_function_url_config.yaml @@ -1,21 +1,21 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - FunctionUrlConfig: - AuthType: NONE - Cors: - AllowOrigins: - - "https://foo.com" - AllowMethods: - - "POST" - AllowCredentials: true - AllowHeaders: - - "x-Custom-Header" - ExposeHeaders: - - "x-amzn-header" - MaxAge: 10 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + FunctionUrlConfig: + AuthType: NONE + Cors: + AllowOrigins: + - https://foo.com + AllowMethods: + - POST + AllowCredentials: true + AllowHeaders: + - x-Custom-Header + ExposeHeaders: + - x-amzn-header + MaxAge: 10 diff --git a/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml b/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml index 26e7476b6a..21bac9d63d 100644 --- a/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml +++ b/integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias.yaml @@ -1,22 +1,22 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - AutoPublishAlias: live - FunctionUrlConfig: - AuthType: NONE - Cors: - AllowOrigins: - - "https://foo.com" - AllowMethods: - - "POST" - AllowCredentials: true - AllowHeaders: - - "x-Custom-Header" - ExposeHeaders: - - "x-amzn-header" - MaxAge: 10 + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + AutoPublishAlias: live + FunctionUrlConfig: + AuthType: NONE + Cors: + AllowOrigins: + - https://foo.com + AllowMethods: + - POST + AllowCredentials: true + AllowHeaders: + - x-Custom-Header + ExposeHeaders: + - x-amzn-header + MaxAge: 10 diff --git a/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml b/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml index 80faf07b8c..cffd8aaf04 100644 --- a/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml +++ b/integration/resources/templates/single/basic_function_with_kmskeyarn.yaml @@ -1,32 +1,31 @@ Resources: - BasicFunctionWithKmsKeyArn: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Environment: - Variables: - Key: Value - KmsKeyArn: - Fn::GetAtt: [MyKey, Arn] + BasicFunctionWithKmsKeyArn: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Environment: + Variables: + Key: Value + KmsKeyArn: + Fn::GetAtt: [MyKey, Arn] - MyKey: - Type: "AWS::KMS::Key" - Properties: - Description: "A sample key" - KeyPolicy: - Version: "2012-10-17" - Id: "key-default-1" - Statement: - - - Sid: "Allow administration of the key" - Effect: "Allow" - Principal: - AWS: - Fn::Sub: "arn:${AWS::Partition}:iam::${AWS::AccountId}:root" - Action: - - "kms:*" - Resource: "*" \ No newline at end of file + MyKey: + Type: AWS::KMS::Key + Properties: + Description: A sample key + KeyPolicy: + Version: '2012-10-17' + Id: key-default-1 + Statement: + - Sid: Allow administration of the key + Effect: Allow + Principal: + AWS: + Fn::Sub: arn:${AWS::Partition}:iam::${AWS::AccountId}:root + Action: + - kms:* + Resource: '*' diff --git a/integration/resources/templates/single/basic_function_with_sns_dlq.yaml b/integration/resources/templates/single/basic_function_with_sns_dlq.yaml index ad2c79512e..5f0b5278cf 100644 --- a/integration/resources/templates/single/basic_function_with_sns_dlq.yaml +++ b/integration/resources/templates/single/basic_function_with_sns_dlq.yaml @@ -8,7 +8,7 @@ Resources: DeadLetterQueue: Type: SNS TargetArn: - Ref: "MyTopic" + Ref: MyTopic MyTopic: Type: AWS::SNS::Topic diff --git a/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml b/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml index 0e3405f9b4..bc6d0a7b49 100644 --- a/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml +++ b/integration/resources/templates/single/basic_function_with_sqs_dlq.yaml @@ -1,4 +1,3 @@ - Resources: MyFunction: Type: AWS::Serverless::Function @@ -9,7 +8,7 @@ Resources: DeadLetterQueue: Type: SQS TargetArn: - Fn::GetAtt: ["MyQueue", "Arn"] + Fn::GetAtt: [MyQueue, Arn] MyQueue: Type: AWS::SQS::Queue diff --git a/integration/resources/templates/single/basic_function_with_tags.yaml b/integration/resources/templates/single/basic_function_with_tags.yaml index 3368c01201..84ed4afc8f 100644 --- a/integration/resources/templates/single/basic_function_with_tags.yaml +++ b/integration/resources/templates/single/basic_function_with_tags.yaml @@ -1,14 +1,14 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tags: - TagKey1: TagValue1 - TagKey2: "" + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tags: + TagKey1: TagValue1 + TagKey2: '' diff --git a/integration/resources/templates/single/basic_function_with_tracing.yaml b/integration/resources/templates/single/basic_function_with_tracing.yaml index 469a3a7866..b24e8df1fa 100644 --- a/integration/resources/templates/single/basic_function_with_tracing.yaml +++ b/integration/resources/templates/single/basic_function_with_tracing.yaml @@ -10,27 +10,27 @@ Parameters: Default: PassThrough Resources: - ActiveTracingFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tracing: Active + ActiveTracingFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tracing: Active - PassThroughTracingFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Tracing: - Ref: TracingParamPassThrough + PassThroughTracingFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Tracing: + Ref: TracingParamPassThrough diff --git a/integration/resources/templates/single/basic_function_with_x86_architecture.yaml b/integration/resources/templates/single/basic_function_with_x86_architecture.yaml index 3196a8bf1e..fea7df8f44 100644 --- a/integration/resources/templates/single/basic_function_with_x86_architecture.yaml +++ b/integration/resources/templates/single/basic_function_with_x86_architecture.yaml @@ -1,11 +1,10 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - Architectures: - - x86_64 - + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + Architectures: + - x86_64 diff --git a/integration/resources/templates/single/basic_http_api.yaml b/integration/resources/templates/single/basic_http_api.yaml index 27e3c340d2..0138fc1e83 100644 --- a/integration/resources/templates/single/basic_http_api.yaml +++ b/integration/resources/templates/single/basic_http_api.yaml @@ -8,4 +8,4 @@ Resources: title: Ref: AWS::StackName openapi: 3.0.1 - paths: {} \ No newline at end of file + paths: {} diff --git a/integration/resources/templates/single/basic_layer.yaml b/integration/resources/templates/single/basic_layer.yaml index 6b308fd91f..8b9b4fa7b5 100644 --- a/integration/resources/templates/single/basic_layer.yaml +++ b/integration/resources/templates/single/basic_layer.yaml @@ -1,6 +1,6 @@ Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - RetentionPolicy: Delete + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + RetentionPolicy: Delete diff --git a/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml b/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml index 648175109c..6bae023418 100644 --- a/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml +++ b/integration/resources/templates/single/basic_layer_with_compatible_architecture.yaml @@ -1,28 +1,27 @@ Parameters: - Runtimes: - Type: CommaDelimitedList - Default: nodejs14.x - LayerName: - Type: String - Default: MyNamedLayerVersion - + Runtimes: + Type: CommaDelimitedList + Default: nodejs14.x + LayerName: + Type: String + Default: MyNamedLayerVersion + Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - LayerName: - Ref: LayerName - CompatibleRuntimes: - Ref: Runtimes - CompatibleArchitectures: [x86_64, arm64] + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + LayerName: + Ref: LayerName + CompatibleRuntimes: + Ref: Runtimes + CompatibleArchitectures: [x86_64, arm64] Outputs: - MyLayerArn: - Value: - Ref: MyLayerVersion - LayerName: - Value: - Ref: LayerName - + MyLayerArn: + Value: + Ref: MyLayerVersion + LayerName: + Value: + Ref: LayerName diff --git a/integration/resources/templates/single/basic_layer_with_parameters.yaml b/integration/resources/templates/single/basic_layer_with_parameters.yaml index 01b8a86711..ea789c27e8 100644 --- a/integration/resources/templates/single/basic_layer_with_parameters.yaml +++ b/integration/resources/templates/single/basic_layer_with_parameters.yaml @@ -1,46 +1,46 @@ Parameters: - Retention: - Type: String - Default: Retain - License: - Type: String - Default: MIT-0 - Runtimes: - Type: CommaDelimitedList - Default: nodejs14.x - LayerName: - Type: String - Default: MyNamedLayerVersion - Description: - Type: String - Default: Some description about this layer goes here + Retention: + Type: String + Default: Retain + License: + Type: String + Default: MIT-0 + Runtimes: + Type: CommaDelimitedList + Default: nodejs14.x + LayerName: + Type: String + Default: MyNamedLayerVersion + Description: + Type: String + Default: Some description about this layer goes here Resources: - MyLayerVersion: - Type: AWS::Serverless::LayerVersion - Properties: - ContentUri: ${contenturi} - LayerName: - Ref: LayerName - RetentionPolicy: - Ref: Retention - CompatibleRuntimes: - Ref: Runtimes - LicenseInfo: - Ref: License - Description: - Ref: Description + MyLayerVersion: + Type: AWS::Serverless::LayerVersion + Properties: + ContentUri: ${contenturi} + LayerName: + Ref: LayerName + RetentionPolicy: + Ref: Retention + CompatibleRuntimes: + Ref: Runtimes + LicenseInfo: + Ref: License + Description: + Ref: Description Outputs: - MyLayerArn: - Value: - Ref: MyLayerVersion - License: - Value: - Ref: License - Description: - Value: - Ref: Description - LayerName: - Value: - Ref: LayerName \ No newline at end of file + MyLayerArn: + Value: + Ref: MyLayerVersion + License: + Value: + Ref: License + Description: + Value: + Ref: Description + LayerName: + Value: + Ref: LayerName diff --git a/integration/resources/templates/single/basic_state_machine_inline_definition.yaml b/integration/resources/templates/single/basic_state_machine_inline_definition.yaml index 8fb8a16cde..38a6611447 100644 --- a/integration/resources/templates/single/basic_state_machine_inline_definition.yaml +++ b/integration/resources/templates/single/basic_state_machine_inline_definition.yaml @@ -16,8 +16,8 @@ Resources: Result: World End: true Policies: - - Version: '2012-10-17' - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' diff --git a/integration/resources/templates/single/basic_state_machine_with_tags.yaml b/integration/resources/templates/single/basic_state_machine_with_tags.yaml index 8156526419..1bf868926d 100644 --- a/integration/resources/templates/single/basic_state_machine_with_tags.yaml +++ b/integration/resources/templates/single/basic_state_machine_with_tags.yaml @@ -15,11 +15,11 @@ Resources: Result: World End: true Policies: - - Version: "2012-10-17" - Statement: - - Effect: Deny - Action: "*" - Resource: "*" + - Version: '2012-10-17' + Statement: + - Effect: Deny + Action: '*' + Resource: '*' Tags: TagOne: ValueOne TagTwo: ValueTwo diff --git a/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml b/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml index ddc1a13bde..e5de73edc8 100644 --- a/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml +++ b/integration/resources/templates/single/function_with_deployment_preference_alarms_intrinsic_if.yaml @@ -1,11 +1,11 @@ Conditions: MyCondition: Fn::Equals: - - true - - false + - true + - false Resources: MyLambdaFunction: - Type: "AWS::Serverless::Function" + Type: AWS::Serverless::Function Properties: CodeUri: ${codeuri} Handler: hello.handler @@ -15,9 +15,9 @@ Resources: Type: Linear10PercentEvery3Minutes Alarms: Fn::If: - - MyCondition - - - Alarm1 - - Alarm2 - - Alarm3 - - - Alarm1 - - Alarm5 + - MyCondition + - - Alarm1 + - Alarm2 + - Alarm3 + - - Alarm1 + - Alarm5 diff --git a/integration/resources/templates/single/function_with_ephemeral_storage.yaml b/integration/resources/templates/single/function_with_ephemeral_storage.yaml index 74fb1ab789..07d69f8b10 100644 --- a/integration/resources/templates/single/function_with_ephemeral_storage.yaml +++ b/integration/resources/templates/single/function_with_ephemeral_storage.yaml @@ -1,17 +1,17 @@ Resources: - MyLambdaFunction: - Type: AWS::Serverless::Function - Properties: - Handler: index.handler - Runtime: nodejs14.x - CodeUri: ${codeuri} - MemorySize: 128 - EphemeralStorage: - Size: 1024 - Policies: - - AWSLambdaRole - - AmazonS3ReadOnlyAccess - Environment: - Variables: - Name: Value - Name2: Value2 \ No newline at end of file + MyLambdaFunction: + Type: AWS::Serverless::Function + Properties: + Handler: index.handler + Runtime: nodejs14.x + CodeUri: ${codeuri} + MemorySize: 128 + EphemeralStorage: + Size: 1024 + Policies: + - AWSLambdaRole + - AmazonS3ReadOnlyAccess + Environment: + Variables: + Name: Value + Name2: Value2 diff --git a/integration/setup/companion-stack.yaml b/integration/setup/companion-stack.yaml index e33fc1d7d3..2e545d751b 100644 --- a/integration/setup/companion-stack.yaml +++ b/integration/setup/companion-stack.yaml @@ -1,30 +1,30 @@ Resources: PreCreatedVpc: - Type: "AWS::EC2::VPC" + Type: AWS::EC2::VPC Properties: - CidrBlock: "10.0.0.0/16" + CidrBlock: 10.0.0.0/16 PreCreatedSubnetOne: - Type: "AWS::EC2::Subnet" + Type: AWS::EC2::Subnet Properties: VpcId: Ref: PreCreatedVpc - CidrBlock: "10.0.0.0/24" + CidrBlock: 10.0.0.0/24 AvailabilityZone: Fn::Select: - - 0 - - Fn::GetAZs: "" + - 0 + - Fn::GetAZs: '' PreCreatedSubnetTwo: - Type: "AWS::EC2::Subnet" + Type: AWS::EC2::Subnet Properties: VpcId: Ref: PreCreatedVpc - CidrBlock: "10.0.1.0/24" + CidrBlock: 10.0.1.0/24 AvailabilityZone: Fn::Select: - - 1 - - Fn::GetAZs: "" + - 1 + - Fn::GetAZs: '' PreCreatedInternetGateway: Type: AWS::EC2::InternetGateway @@ -43,26 +43,26 @@ Resources: Outputs: PreCreatedVpc: - Description: "Pre-created VPC that can be used inside other tests" + Description: Pre-created VPC that can be used inside other tests Value: Ref: PreCreatedVpc PreCreatedSubnetTwo: - Description: "Pre-created #2 subnet that can be used inside other tests" + Description: 'Pre-created #2 subnet that can be used inside other tests' Value: Ref: PreCreatedSubnetTwo PreCreatedSubnetOne: - Description: "Pre-created #1 subnet that can be used inside other tests" + Description: 'Pre-created #1 subnet that can be used inside other tests' Value: Ref: PreCreatedSubnetOne PreCreatedInternetGateway: - Description: "Pre-created Internet Gateway that can be used inside other tests" + Description: Pre-created Internet Gateway that can be used inside other tests Value: Ref: PreCreatedInternetGateway PreCreatedAttachGateway: - Description: "Pre-created Attach Gateway that can be used inside other tests" + Description: Pre-created Attach Gateway that can be used inside other tests Value: Ref: PreCreatedAttachGateway PreCreatedS3Bucket: - Description: "Pre-created S3 Bucket that can be used inside other tests" - Value: - Ref: PreCreatedS3Bucket \ No newline at end of file + Description: Pre-created S3 Bucket that can be used inside other tests + Value: + Ref: PreCreatedS3Bucket diff --git a/integration/setup/example-sar-app.yaml b/integration/setup/example-sar-app.yaml index 483eec305c..cbd7722231 100644 --- a/integration/setup/example-sar-app.yaml +++ b/integration/setup/example-sar-app.yaml @@ -18,4 +18,4 @@ Resources: Timeout: 5 Environment: Variables: - IdentityNameParameter: !Ref IdentityNameParameter \ No newline at end of file + IdentityNameParameter: !Ref IdentityNameParameter