Post above needs more love… this is spot on, you saved me hours of bashing codestar into submission. I had to switch to serverless from the AWS SAM because I was unable to make it work with cors using inline swagger
I needed a number of changes to fix my codestar install to work with serverless:
Permission changes on the IAM role for the codebuild phase were against the role ‘CodeStarWorker--CodeBuild’ instead of CloudFormation (typo on your end) and they required:
s3:ListAllMyBuckets
s3:GetBucketLocation
Also, the build command for your upload needed to change to:
– sh ./upload.sh