Deploy with AWS EC2 User-Data
Prerequisites
Step 1: Store credentials in Secrets Manager
aws secretsmanager create-secret \
--name linuxguard/credentials \
--secret-string '{"api_key":"<API_KEY>","tenant_id":"<TENANT_ID>"}' \
--region <AWS_REGION>Step 2: Attach an IAM policy to your instance role
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "secretsmanager:GetSecretValue",
"Resource": "arn:aws:secretsmanager:<AWS_REGION>:<ACCOUNT_ID>:secret:linuxguard/credentials-*"
}
]
}Step 3: Configure and launch with user-data
Last updated
Was this helpful?