Hello,
I want to initiate deployment of bitbucket repo code to AWS codedeploy service after each commit. Which will then install it on EC2 instance based on tag values.
The EC2 instance will have linux, apache, php installed and there will be separate rds for mysql.
Here is the pipeline yml file which i built from available documentation & its failing at uploading zip file to S3.
Need help in solving this error as well want to know where should be appspec.yml be placed
pipelines:
default:
- step:
name: Deploy to staging
deployment: staging #can be test,staging or production.
#trigger: manual #Comment to make it automatic
script:
- echo "Deploying to staging environment"
- pipe: atlassian/aws-code-deploy:0.2.3
variables:
AWS_DEFAULT_REGION: 'ap-southeast-1' # ap-southeast-1, us-east-1
AWS_ACCESS_KEY_ID: 'mykey'
AWS_SECRET_ACCESS_KEY: 'mysecretkey'
COMMAND: 'upload' # 'upload' or 'deploy'.
APPLICATION_NAME: 'myWeb'
ZIP_FILE: 'webstg.zip'
S3_BUCKET: 'webdevops'
VERSION_LABEL: 'web-stg-1.0.0'
- pipe: atlassian/aws-code-deploy:0.2.3
variables:
AWS_ACCESS_KEY_ID: 'mykey'
AWS_SECRET_ACCESS_KEY: 'mysecretkey'
AWS_DEFAULT_REGION: 'us-east-1' # ap-southeast-1, us-east-1
APPLICATION_NAME: 'myWeb'
COMMAND: 'deploy' # 'upload' or 'deploy'.
DEPLOYMENT_GROUP: 'staging'
WAIT: 'true'
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'
S3_BUCKET: 'webdevops'
VERSION_LABEL: 'web-stg-1.0.0'
**********
Error
<span>aws s3 cp <a href="http://dswebstg.zip/" target="_blank" rel="noopener nofollow noreferrer">webstg.zip</a> s3://webdevops/web-stg-1.0.0</span><span>The user-provided path <a href="http://dswebstg.zip/" target="_blank" rel="noopener nofollow noreferrer">webstg.zip</a> does not exist.</span><span>✖ Failed to upload <a href="http://dswebstg.zip/" target="_blank" rel="noopener nofollow noreferrer">webstg.zip</a> to S3.</span>
Thanks,
Santosh