AWS: mudanças entre as edições

De Wiki Doth
Ir para navegação Ir para pesquisar
Linha 65: Linha 65:
sudo service codedeploy-agent start
sudo service codedeploy-agent start
</code>
</code>
= SES =
== SES Template ==
aws ses create-template --cli-input-json file:file.json
aws ses detele-template --template-name MyTemplate
aws ses get-template --template-name MyTemplate
aws ses update-template --cli-input-json file://file.json
aws ses test-render-template --template-name MyTemplate --template-data {"nome":"murilo"} --region sa-east-1

Edição das 18h38min de 17 de outubro de 2022

x

EC2

Metadatas: http://169.25.169.254/latest/metadata

https://docs.aws.amazon.com/pt_br/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

Code Deploy

Instalar agente do CodeDeploy

sudo apt-get update

sudo apt install ruby-full

sudo apt install wget

cd /home/user/

wget https://bucket-name.s3.region-identifier.amazonaws.com/latest/install

wget https://aws-codedeploy-sa-east-1.s3.sa-east-1.amazonaws.com/latest/install

chmod +x ./install

sudo ./install auto

https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html

  • Verificar

sudo service codedeploy-agent status

sudo service codedeploy-agent start

Erro Code Deploy

The ApplicationStop hook is being called from the previously installed deployment before trying to run the current deployment appspec.yml file.

In order to prevent this from happening you'll have to remove any previously installed deployment from the server.

Stop the code deploy agent

sudo service codedeploy-agent stop

clear all deployments under

/opt/codedeploy-agent/deployment-root

Restart the code deploy agent

sudo service codedeploy-agent start

SES

SES Template

aws ses create-template --cli-input-json file:file.json aws ses detele-template --template-name MyTemplate aws ses get-template --template-name MyTemplate aws ses update-template --cli-input-json file://file.json aws ses test-render-template --template-name MyTemplate --template-data {"nome":"murilo"} --region sa-east-1