I am trying to get a proof of concept running for the new GitHub Actions API. For reference, you can see the failed run here. While the docker image seems to be building and running just fine, it's failing at the end with this error message.
An error occurred (ResourceNotFoundException) when calling the UpdateFunctionCode operation Functions from 'us-west-2' are not reachable in this region ('us-east-1')
I suspect that this means that these jobs run from the us-east-1 region, and cannot talk to the region I want (us-west-2), is there anyway to specify which region I am talking to?
In a failed attempt to solve this region problem, I created an lambda in the us-east-1 region and tried to upload there instead, where I came across the following error:
An error occurred (InvalidParameterValueException) when calling the UpdateFunctionCode operation: Error occurred while GetObject. S3 Error Code: AuthorizationHeaderMalformed. S3 Error Message: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'I have already set IAM and other permissions correctly on the AWS side, and I can invoke the analogous commands manually with the aws cli, which this action purports to wrap. What changes can I make to my actions so that these complete successfully?
Solved! Solved! Go to Solution.
The GitHub Action for Aws defaults to the us-east-1 region. You migth want to use the optional environment variable AWS_DEFAULT_REGION and set it to us-west-2 so both the action and the resource you are accessing are in the same region.
You can find more information on the action README file.