cloudformation-template-create-stack.json 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "AWSTemplateFormatVersion": "2010-09-09",
  3. "Description": "The AWS CloudFormation template for this Serverless application",
  4. "Resources": {
  5. "ServerlessDeploymentBucket": {
  6. "Type": "AWS::S3::Bucket",
  7. "Properties": {
  8. "BucketEncryption": {
  9. "ServerSideEncryptionConfiguration": [
  10. {
  11. "ServerSideEncryptionByDefault": {
  12. "SSEAlgorithm": "AES256"
  13. }
  14. }
  15. ]
  16. }
  17. }
  18. },
  19. "ServerlessDeploymentBucketPolicy": {
  20. "Type": "AWS::S3::BucketPolicy",
  21. "Properties": {
  22. "Bucket": {
  23. "Ref": "ServerlessDeploymentBucket"
  24. },
  25. "PolicyDocument": {
  26. "Statement": [
  27. {
  28. "Action": "s3:*",
  29. "Effect": "Deny",
  30. "Principal": "*",
  31. "Resource": [
  32. {
  33. "Fn::Join": [
  34. "",
  35. [
  36. "arn:",
  37. {
  38. "Ref": "AWS::Partition"
  39. },
  40. ":s3:::",
  41. {
  42. "Ref": "ServerlessDeploymentBucket"
  43. },
  44. "/*"
  45. ]
  46. ]
  47. },
  48. {
  49. "Fn::Join": [
  50. "",
  51. [
  52. "arn:",
  53. {
  54. "Ref": "AWS::Partition"
  55. },
  56. ":s3:::",
  57. {
  58. "Ref": "ServerlessDeploymentBucket"
  59. }
  60. ]
  61. ]
  62. }
  63. ],
  64. "Condition": {
  65. "Bool": {
  66. "aws:SecureTransport": false
  67. }
  68. }
  69. }
  70. ]
  71. }
  72. }
  73. }
  74. },
  75. "Outputs": {
  76. "ServerlessDeploymentBucketName": {
  77. "Value": {
  78. "Ref": "ServerlessDeploymentBucket"
  79. }
  80. }
  81. }
  82. }