question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

STS support for deploy

See original GitHub issue
  • Expected behaviour: It should create and deploy both the Api Gateway endpoint and the Lambda function
  • What actually happens: I get an AccessDenied error due to the restrictions our operations operations team imposes. Here is the output
initialising IAM role   iam.createRole  RoleName=claudia-hello-world-executor
{ [AccessDenied: User: arn:aws:iam::XXXXXXXXX:user/francisco.calle is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::XXXXXXXXX:role/claudia-hello-world-executor]
  cause:
   { [AccessDenied: User: arn:aws:iam::XXXXXXXXX:user/francisco.calle is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::XXXXXXXXX:role/claudia-hello-world-executor]
     message: 'User: arn:aws:iam::XXXXXXXXX:user/francisco.calle is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::XXXXXXXXX:role/claudia-hello-world-executor',
     code: 'AccessDenied',
     time: Thu Sep 15 2016 17:41:22 GMT+0200 (CEST),
     requestId: 'da51dd6d-7b5a-11e6-acfe-07a6295c8f0a',
     statusCode: 403,
     retryable: false,
     retryDelay: 78.65617338102311 },
  isOperational: true,
  code: 'AccessDenied',
  time: Thu Sep 15 2016 17:41:22 GMT+0200 (CEST),
  requestId: 'da51dd6d-7b5a-11e6-acfe-07a6295c8f0a',
  statusCode: 403,
  retryable: false,
  retryDelay: 78.65617338102311 }
  • Link to a minimal, executable project that demonstrates the problem: No need, I’m just using the hello world example
  • Steps to reproduce the problem: Execute claudia --role-arn arn:aws:iam::XXXXXXXXX:role/dev-project-delegated-developer --role-arn-name corp-session-default --profile corp-session-default create --region us-east-1 --api-module index
  • Extra information: I’ve made a repo based on another project to deploy a lambda function that illustrates how we have to make the deployments https://github.com/beeva-franciscocalle/beeva-aws-node-lambda

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
briancsparkscommented, Aug 8, 2018

Assuming you have IAM roles setup properly, https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html gives most of the info. The trick is to use the AWS CLI (aws sts assume-role …) to assume the right role, but then you have to manually stuff the credentials into environment variables.

aws sts assume-role --role-arn arn:aws:...:role/supercow --role-session-name foobar > /tmp/creds
export AWS_SECRET_ACCESS_KEY="$(cat /tmp/creds | jq '.Credentials.SecretAccessKey')"
# similar for AWS_ACCESS_KEY_ID and AWS_SESSION_TOKEN

rm -f /tmp/creds

# Claudia is now happy
claudia create ...

With ~/.aws/config similar to:

[profile claudia]
aws_access_key_id = ABC123
aws_secret_access_key = adsfger1243

[profile xaccount]
role_arn = arn:aws:...:role/supercow
source_profile = claudia
1reaction
gojkocommented, Sep 16, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started | Deploying to Cloud Foundry from STS - Spring
This guide walks you through the process of deploying a "hello world" Spring application to Cloud Foundry from Spring Tool Suite (STS).
Read more >
Understanding the ROSA with STS deployment workflow
You can use AWS STS with Red Hat OpenShift Service on AWS (ROSA) to allocate temporary, limited-privilege credentials for component-specific IAM roles. The ......
Read more >
Deployed WAR from STS (Spring Tool Suite) 3 on Jboss ...
I hope my answer will help you. ... While deploying the spring boot war file in JBoss EAP you need to take care...
Read more >
A Guide to Spring in Eclipse STS - Baeldung
A quick guide to working with Spring using the Eclipse Spring Tool Suite (STS) IDE.
Read more >
Spring Boot Deployment through Cloud Foundry Eclipse
STS provides a wizard to easily create a Spring Boot project that is ready to run locally or deployed to Cloud Foundry. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found