This example shows how to set up EC2 instance to create mediaconvert job and CI/CD Pipeline.
- Make sure you have AWS CLI installed and configured with an aws account you want to use.
- Ensure you have nodejs installed.
- Ensure you have direnv installed.
npm install
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export AWS_PROFILE=<the configuration profile for aws-cli>
export ENDPOINT_URL=<account-specific endpoint for mediaconvert>
To get endpoint url for mediaconvert, run the given python script (utils/emc_endpoint.py)
$ source .venv/bin/activate # You need to activate virtualenv first, skip this if you did.
$ python utils/emc_endpoint.py
npx cdk bootstrap --profile <the configuration profile for aws-cli>
npx cdk deploy EC2Media
If you run "npx cdk deploy EC2Media", then you will have codecommit repository named "ec2media", You have to push flask source code to the codecommit repository. The flask source code is in ec2media directory. To push the source code to codecommit, you need to set up codecommit to connect it.
Refer to the guideline below
After you set up codecommit, then run this command. You can find in AWS console for CodeCommit. In seoul region, this would be git-codecommit.ap-northeast-2.amazonaws.com/v1/repos/ec2media
$ cd ec2media
$ git init
$ git remote add origin ssh://<codecommit url>
$ git add .
$ git commit -m "initial commit"
$ git push --set-upstream origin master
After you set up codecommit and push ec2media source code, go to CodePipeline AWS Console. You will see a pipeline is in progress
Open S3 AWS Console, there is S3 bucket which starts with "ec2media-eventnestedstackeve" Create temp and output folder
Upload sample media file to temp folder, output file will be placed to output folder.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.