From 41d1299097211160bb645ae83c770d9a4f6d6520 Mon Sep 17 00:00:00 2001 From: Brett Andrews Date: Fri, 15 Jun 2018 14:01:05 -0700 Subject: [PATCH 1/3] fix: set correct SQS managed role arn: AWSLambdaSQSQueueExecutionRole --- samtranslator/model/eventsources/pull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samtranslator/model/eventsources/pull.py b/samtranslator/model/eventsources/pull.py index e2e309237..1d0e566eb 100644 --- a/samtranslator/model/eventsources/pull.py +++ b/samtranslator/model/eventsources/pull.py @@ -99,4 +99,4 @@ class SQS(PullEventSource): resource_type = 'SQS' def get_policy_arn(self): - return ArnGenerator.generate_aws_managed_policy_arn('service-role/AWSLambdaSQSExecutionRole') + return ArnGenerator.generate_aws_managed_policy_arn('service-role/AWSLambdaSQSQueueExecutionRole') From fec9939d5add0603cf0e369c9e459b6b6cadaad0 Mon Sep 17 00:00:00 2001 From: Brett Andrews Date: Thu, 21 Jun 2018 13:28:46 -0700 Subject: [PATCH 2/3] doc(example): fix sqs example template --- examples/2016-10-31/sqs/template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/2016-10-31/sqs/template.yaml b/examples/2016-10-31/sqs/template.yaml index 535f7fdac..441d7e5a5 100644 --- a/examples/2016-10-31/sqs/template.yaml +++ b/examples/2016-10-31/sqs/template.yaml @@ -13,7 +13,7 @@ Resources: Type: SQS Properties: Queue: !GetAtt MySqsQueue.Arn + BatchSize: 10 MySqsQueue: Type: AWS::SQS::Queue - Properties: \ No newline at end of file From 650a17b3ffc1676f3764819cb04f287096f8a3ff Mon Sep 17 00:00:00 2001 From: Brett Andrews Date: Thu, 21 Jun 2018 14:44:04 -0700 Subject: [PATCH 3/3] test: fix sqs tests - specify correct Role --- tests/translator/output/aws-cn/sqs.json | 2 +- tests/translator/output/aws-us-gov/sqs.json | 2 +- tests/translator/output/sqs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/translator/output/aws-cn/sqs.json b/tests/translator/output/aws-cn/sqs.json index 29e529af5..eb1a09139 100644 --- a/tests/translator/output/aws-cn/sqs.json +++ b/tests/translator/output/aws-cn/sqs.json @@ -5,7 +5,7 @@ "Properties": { "ManagedPolicyArns": [ "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaSQSExecutionRole" + "arn:aws-cn:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole" ], "AssumeRolePolicyDocument": { "Version": "2012-10-17", diff --git a/tests/translator/output/aws-us-gov/sqs.json b/tests/translator/output/aws-us-gov/sqs.json index f58f3df02..8398eda66 100644 --- a/tests/translator/output/aws-us-gov/sqs.json +++ b/tests/translator/output/aws-us-gov/sqs.json @@ -5,7 +5,7 @@ "Properties": { "ManagedPolicyArns": [ "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaSQSExecutionRole" + "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole" ], "AssumeRolePolicyDocument": { "Version": "2012-10-17", diff --git a/tests/translator/output/sqs.json b/tests/translator/output/sqs.json index 0ca3a1860..2ed583e2d 100644 --- a/tests/translator/output/sqs.json +++ b/tests/translator/output/sqs.json @@ -5,7 +5,7 @@ "Properties": { "ManagedPolicyArns": [ "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "arn:aws:iam::aws:policy/service-role/AWSLambdaSQSExecutionRole" + "arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole" ], "AssumeRolePolicyDocument": { "Version": "2012-10-17",