I have been using Drone as CI/CD, running on AWS EC2 instances(hosted in ap-south-1) attached with IAM roles (roles includes all required IAM permissions for activities performed by Drone). Am using Drone AWS Lambda deploy plugin to deploy the lambda function code from S3 bucket.
Both S3 bucket and lambda function are in same region(ap-south-1), but the problem is when pipeline trying to deploy the package, it through s aws region issue mentioned below. i have check the link of this plugin, where written that aws_default_region secret can be passed to override the profile’s default region. I pass secret to lambda deploy plugin using both names aws_region as well as aws_default_region, but no luck so far same issue was coming.
Please let me know if secrets are supported by this plugin or if we can pass on the aws region in plugin definition via parameter which does not mentioned in the plugin docs. Find the below details:
Error thrown by aws lambda deploy plugin:
AuthorizationHeaderMalformed. S3 Error Message: The authorization header is malformed; the region ‘us-east-1’ is wrong; expecting ‘ap-south-1’
Drone pipeline configuration:
- first i have created secrets like aws _region and aws_default_region = ap-south-1
secrets: [ AWS_DEFAULT_REGION ] as well as with .secrets: [ AWS_REGION ]
Secrets are case sensitive, i mean secret is created in small letters and we can define them in secrets: [ in both small and capital letters]? and these will be exposed to pipeline containers in CAPS.
Please let me if am doing it in wrong way.