Within the pipe for ElasticBeanstalk, we are looking to use the $S3_BUCKET variable to use different subfolders based on deployments, such as companybucket/beta, companybucket/feature, and so on.
However, when we set a subfolder within that variable, we get an error during deploy that reads:
An error occurred (InvalidParameterCombination) when calling the CreateApplicationVersion operation: Invalid S3 location Bucket: companybucket/beta Key: environment/environment-54-34034856.zip.
It is strange, as it can upload successfully to S3 in the line before this one:
Artifact uploaded successfully to s3://companybucket/beta/environment/environment-54-34034856.zip
My hunch is that the parameters are different for the S3 upload and the ElasticBeanstalk deploy.
Is there a workaround for this, or a better way we can use one bucket for multiple deployments?