hi aws frends, I’m managing a kinesis app with pul...
# aws
hi aws frends, I’m managing a kinesis app with pulumi, but when I update the code on S3 that will be used by the app, the
resource doesn’t seem to reload the code. at the moment I’m manually bumping a version number in the s3 code key to get it to all properly cycle — does anyone know a better way?
Are you using a Pulumi BucketObject? Or just uploading the file? If you're using a single BucketObject and calling
pulumi up
to update it, you can add a
If you're uploading an object, then there's nothing Pulumi can do. You could create a lambda that listens for upload events and does the right thing. Taking Pulumi out of the equation.
Hey tenwit 🙂 I’ll try to grab the relevant code:
Copy code
const code = new aws.s3.BucketObject(..)
new aws.kinesisanalyticsv2.Application('...', {
  applicationConfiguration: {
    applicationCodeConfiguration: {
      codeContentType: 'ZIPFILE',
      codeContent: {
        s3ContentLocation: {
          bucketArn: datalake.bucket.arn,
          fileKey: code.key,
So if you're changing the code locally and uploading it using that BucketObject, then add a
dependsOn: code
to the 3rd parameter to
new Application(name, args, opts)
so when i update the code behind the bucket object, it actually does update the kinesis application as well, e.g.
updated (14s)    [diff: ~applicationConfiguration]
But - and this may be a AWS issue - the application continues to exhibit bugs that were fixed in the new code, and I need to manually make some changes in AWS console to get the new code to be accepted
ok I’ll give dependsOn a try
thanks! 🙌
Ah, no, it's already dependent because of that key.
Adding dependsOn won't help.
What are the changes that you have to make in the console?
I copy the s3 bucket object and add a number to the end, then go into kinesis apps and press ‘configure’ to change the code location
If that's how Kinesis needs to be configured, then that's what you have to do in Pulumi. Can you not get Kinesis to always use the same object? Or does it have to use a different object for every update?
Creating a new object in Pulumi every time you run an update is going to be a messy pain. I wouldn't do that.
ok I’ll try to do some more testing and see if I can create a reproduction repo
Hi tenwit, I found the solution and it was a kinesis-specific issue: https://docs.aws.amazon.com/kinesisanalytics/latest/java/troubleshooting-development.html#troubleshooting-update thanks for taking a look earlier 🙂 appreciate it