1
0
mirror of https://github.com/raseels-repos/golang-saas-starter-kit.git synced 2025-08-08 22:36:41 +02:00

Fix IAM policy access to s3 bucket

This commit is contained in:
Lee Brown
2020-01-14 16:55:24 -08:00
parent 36630cad30
commit def18c3150
3 changed files with 8 additions and 3 deletions

View File

@ -96,6 +96,9 @@ func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCrede
return cfg, err
}
// Set the Aws Secret Prefix to the Go module name to prevent possible namespace conflict.
cfg.AwsSecretPrefix = modDetails.GoModName
// ProjectRoot should be the root directory for the project.
cfg.ProjectRoot = modDetails.ProjectRoot
@ -489,8 +492,8 @@ func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCrede
"s3:GetObject",
},
Resource: []string{
"arn:aws:::" + cfg.AwsS3BucketPublic.BucketName + "/*",
"arn:aws:::" + cfg.AwsS3BucketPrivate.BucketName + "/*",
"arn:aws:s3:::" + cfg.AwsS3BucketPublic.BucketName + "/*",
"arn:aws:s3:::" + cfg.AwsS3BucketPrivate.BucketName + "/*",
},
},
{