Created
April 5, 2020 13:53
-
-
Save makolyte/ce563262fa5bab9935b07b9edd1781c1 to your computer and use it in GitHub Desktop.
AWS stack template for SQS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Sample stack for Spring Aws Sqs", | |
"Resources": { | |
"QuoteQueue": { | |
"Type": "AWS::SQS::Queue", | |
"Properties": {} | |
}, | |
"SqsAdmin": { | |
"Type": "AWS::IAM::User", | |
"Properties": { | |
"Path": "/", | |
"Policies": [ | |
{ | |
"PolicyName": "giveaccesstoqueueonly", | |
"PolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"sqs:*" | |
], | |
"Resource": [ | |
{ | |
"Fn::GetAtt": [ | |
"QuoteQueue", | |
"Arn" | |
] | |
} | |
] | |
}, | |
{ | |
"Effect": "Deny", | |
"Action": [ | |
"sqs:*" | |
], | |
"NotResource": [ | |
{ | |
"Fn::GetAtt": [ | |
"QuoteQueue", | |
"Arn" | |
] | |
} | |
] | |
} | |
] | |
} | |
}, | |
{ | |
"PolicyName": "readonlyaccesstocloudformation", | |
"PolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:Describe*", | |
"cloudformation:EstimateTemplateCost", | |
"cloudformation:Get*", | |
"cloudformation:List*", | |
"cloudformation:ValidateTemplate", | |
"cloudformation:Detect*" | |
], | |
"Resource": [ | |
"*" | |
] | |
} | |
] | |
} | |
} | |
] | |
} | |
}, | |
"SqsAdminAccessKey": { | |
"Type": "AWS::IAM::AccessKey", | |
"Properties": { | |
"UserName": { | |
"Ref": "SqsAdmin" | |
} | |
} | |
} | |
}, | |
"Outputs": { | |
"AccessKeyForSqsAdmin": { | |
"Value": { | |
"Ref": "SqsAdminAccessKey" | |
} | |
}, | |
"SecretKeyForSqsAdmin": { | |
"Value": { | |
"Fn::GetAtt": [ | |
"SqsAdminAccessKey", | |
"SecretAccessKey" | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment