Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(event-source): set correct SQS role and fix example template #477

Merged
merged 3 commits into from
Jun 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/2016-10-31/sqs/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Resources:
Type: SQS
Properties:
Queue: !GetAtt MySqsQueue.Arn
BatchSize: 10

MySqsQueue:
Type: AWS::SQS::Queue
Properties:
2 changes: 1 addition & 1 deletion samtranslator/model/eventsources/pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
2 changes: 1 addition & 1 deletion tests/translator/output/aws-cn/sqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/translator/output/aws-us-gov/sqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/translator/output/sqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down